Access the current reference to the bytebuffer pool manager from channel frame work.

@return WsByteBufferPoolManager
321907
public static WsByteBufferPoolManager getBufferPoolManager() {
        if (cfwBundleRef.getService() != null) {
            return cfwBundleRef.getService().getBufferManager();
        }
        return ChannelFrameworkFactory.getBufferManager();
    }
185823
public ObjectPool<MemcachedClientIF> getObjectPool() {
        val pool = new GenericObjectPool<MemcachedClientIF>(this);
        pool.setMaxIdle(memcachedProperties.getMaxIdle());
        pool.setMinIdle(memcachedProperties.getMinIdle());
        pool.setMaxTotal(memcachedProperties.getMaxTotal());
        return pool;
    }
1340860
public SIMPIterator getPubSubOutboundTransmitIterator()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getPubSubOutboundTransmitIterator");
    
    //at the moment there should be just one stream set in the manager:
    //therefore this method is misleading. For the moment it will remain
    //deprecated.
    
    SIMPIterator iterator = null;
    //there are only outbound transmitters if the PSOH is not null
    if(_outputHandler!=null)
    {
      InternalOutputStreamManager streamManager = _outputHandler.getInternalOutputStreamManager();
      iterator =
        new BasicSIMPIterator(streamManager.getStreamSetControlIterator(this)); 
    }

    if(iterator==null)
    {
      //return an empty iterator
      iterator =
              new BasicSIMPIterator(new ArrayList().iterator()); 
    }
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getPubSubOutboundTransmitIterator", iterator);
    return iterator;
  }
1356210
public Object getChannelAccessor() // F177053
   {
      if (tc.isEntryEnabled()) SibTr.entry(this, tc, "getChannelAccessor"); // F177053
      if (tc.isEntryEnabled()) SibTr.exit(this, tc, "getChannelAccessor", this); // F177053
      return this;
   }
1260922
public function getMemPercentBuffer()
    {
        if ($this->_memBuffer !== null) {
            if (($this->_memBuffer > 0) && ($this->_memTotal > 0)) {
                if (($this->_memCache !== null) && ($this->_memCache > 0)) {
                    if (($this->_memApplication !== null) && ($this->_memApplication > 0)) {
                        return round(($this->_memBuffer + $this->_memApplication + $this->_memCache) / $this->_memTotal * 100) - $this->getMemPercentApplication() - $this->getMemPercentCache();
                    } else {
                        return round(($this->_memBuffer + $this->_memCache) / $this->_memTotal * 100) - $this->getMemPercentCache();
                    }
                } elseif (($this->_memApplication !== null) && ($this->_memApplication > 0)) {
                    return round(($this->_memBuffer + $this->_memApplication) / $this->_memTotal * 100) - $this->getMemPercentApplication();
                } else {
                    return round($this->_memBuffer / $this->_memTotal * 100);
                }
            } else {
                return 0;
            }
        } else {
            return null;
        }
    }
177041
public WsByteBuffer[] marshallLine() {
        final boolean bTrace = TraceComponent.isAnyTracingEnabled();
        if (bTrace && tc.isEntryEnabled()) {
            Tr.entry(tc, "marshallLine");
        }

        WsByteBuffer[] firstLine = new WsByteBuffer[1];
        firstLine[0] = allocateBuffer(getOutgoingBufferSize());
        firstLine = putBytes(getMarshalledFirstToken(), firstLine);
        firstLine = putByte(BNFHeaders.SPACE, firstLine);
        firstLine = putBytes(getMarshalledSecondToken(), firstLine);
        firstLine = putByte(BNFHeaders.SPACE, firstLine);
        firstLine = putBytes(getMarshalledThirdToken(), firstLine);
        firstLine = putBytes(BNFHeaders.EOL, firstLine);

        // don't flip the last buffer as headers get tacked on the end

        if (bTrace && tc.isEntryEnabled()) {
            Tr.exit(tc, "marshallLine");
        }
        return firstLine;
    }
28102
private LocalThreadObjectPool getThreadLocalObjectPool() {
        if (threadPoolSize <= 0) {
            // no local thread pool needed.
            return null;
        }
        LocalThreadObjectPool localPool = null;
        if (threadLocals != null) {
            localPool = threadLocals.get();
            if (localPool == null) {
                localPool = new LocalThreadObjectPool(threadPoolSize, null, destroyer); // @PK36998C
                threadLocals.set(localPool);

                localPool.setCleanUpOld(cleanUpOld);
            }
        }

        return localPool;
    }
1187816
@Override
    public Reference getReference() {

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
            SibTr.entry(this, TRACE, "getReference");

        final Reference reference = _managedConnectionFactory.getReference();

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
            SibTr.exit(this, TRACE, "getReference", reference);

        return reference;
    }
1229901
@Override
	public BufferProvider getBufferProvider(JobID jobID, ChannelID sourceChannelID) throws IOException {
		EnvelopeReceiverList receiverList = getReceiverList(jobID, sourceChannelID, false);
		
		// check if the receiver is already gone
		if (receiverList == null) {
			return this.discardBufferPool;
		}

		if (!receiverList.hasLocalReceiver() || receiverList.hasRemoteReceiver()) {
			throw new IOException("The destination to be looked up is not a single local endpoint.");
		}
		

		ChannelID localReceiver = receiverList.getLocalReceiver();
		Channel channel = this.channels.get(localReceiver);
		
		if (channel == null) {
			// receiver is already canceled
			return this.discardBufferPool;
		}

		if (!channel.isInputChannel()) {
			throw new IOException("Channel context for local receiver " + localReceiver + " is not an input channel context");
		}

		return (InputChannel<?>) channel;
	}
1148742
public static OutputAccessor from(OutputAccessorPoolHolder poolHolder, ByteBuffer byteBuffer) {

        ByteBufferOutputAccessor accessor = poolHolder.getByteBufferOutputAccessor();
        accessor.byteBuffer = byteBuffer;

        return accessor;
    }
278097
protected ByteBuffer allocateBuffer() {
		if (_buffersToReuse != null && !_buffersToReuse.isEmpty()) {
			ByteBuffer bb = _buffersToReuse.poll();
			bb.rewind();
			bb.limit(bb.capacity());
			return bb;
		}
		ByteBuffer r = StaticBuffers.getInstance().byteBuffer(BUFFER_KEY, _bufferSize);
		r.limit(_bufferSize);
		return r.order(_order);
	}
250628
private ByteBuffer getBuffer() throws IOException {
        ByteBuffer buffer;

        // Get the oldest block that has a buffer
        int bufferCount = 0;
        TableBlock takeFromBlock = null;
        for (TableBlock block : _blocks) {
            if (block.hasBuffer()) {
                bufferCount++;
                if (takeFromBlock == null || block.getMostRecentUse() < takeFromBlock.getMostRecentUse()) {
                    takeFromBlock = block;
                }
            }
        }
        if (bufferCount < _bufferCount || takeFromBlock == null) {
            // We haven't used the maximum number of buffers yet, so allocate a new one
            _log.debug("Allocating new block of size {}", _blockSize);
            buffer = ByteBuffer.allocate(_blockSize);
        } else {
            buffer = takeFromBlock.flushAndReleaseBuffer();
            // Reset the buffer for reuse
            buffer.position(0);
            buffer.limit(_blockSize);
        }

        return buffer;
    }
1339220
public function getPartStreamFilterManagerFactory()
    {
        if ($this->partStreamFilterManagerFactory === null) {
            $this->partStreamFilterManagerFactory = new PartStreamFilterManagerFactory(
                $this->getStreamFactory()
            );
        }
        return $this->getInstance(
            'partStreamFilterManagerFactory',
            __NAMESPACE__ . '\Message\Part\PartStreamFilterManagerFactory'
        );
    }
867724
public ByteBuffer getData() {
        if (this.buffer == null) {
            throw new IllegalStateException("ByteBuffer must have data before it is ready for use.");
        }
        final ByteBuffer copy = CausticUtil.createByteBuffer(buffer.capacity());
        buffer.rewind();
        copy.put(buffer);
        copy.flip();
        return copy;
    }
604871
@Override
    public WsByteBuffer[] marshallLine() {
        WsByteBuffer[] firstLine = new WsByteBuffer[1];
        firstLine[0] = allocateBuffer(getOutgoingBufferSize());

        firstLine = putBytes(this.myMethod.getByteArray(), firstLine);
        firstLine = putByte(SPACE, firstLine);
        firstLine = putBytes(getMarshalledSecondToken(), firstLine);
        firstLine = putByte(SPACE, firstLine);
        firstLine = putBytes(getVersionValue().getByteArray(), firstLine);
        firstLine = putBytes(BNFHeaders.EOL, firstLine);
        // don't flip the last buffer as headers get tacked on the end
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            String url = GenericUtils.nullOutPasswords(getMarshalledSecondToken(), (byte) '&');
            Tr.event(tc, "Marshalling first line: " + getMethod() + " " + url + " " + getVersion());
        }
        return firstLine;
    }
1010362
public ByteBuffer getBuffer() {
        assert(isDirect == false);
        assert(buffer.b().hasArray());
        assert(!buffer.b().isDirect());
        buffer.b().flip();
        return buffer.b().asReadOnlyBuffer();
    }
774149
protected function getMonologHandler()
    {
        return (new StreamHandler($this->path('storage', 'logs/netforce.log'), Logger::DEBUG))->setFormatter(new LineFormatter(null, null, true, true));
    }