Access the reference to the bytebuffer pool manager created by this
bundle, or the default/fallback pool.

This method should never return null

@return WsByteBufferPoolManager
540681
public WsByteBufferPoolManager getBufferManager() {
        ByteBufferConfiguration bbMgr = this.wsbbmgr;

        // Get the byte buffer manager-- bbMgr could return null
        WsByteBufferPoolManager result = (bbMgr == null) ? null : bbMgr.getBufferManager();

        // Fall back to a default if bbMgr was null or null was returned
        return result != null ? result : ChannelFrameworkFactory.getBufferManager();
    }
462751
RichByteBufferImpl getFromPool()
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getFromPool");

      RichByteBufferImpl buffer = (RichByteBufferImpl) byteBufferWrapperPool.remove();
      if (buffer == null)
      {
         buffer = new RichByteBufferImpl();
      }

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "getFromPool", buffer);
      return buffer;
   }
9086
protected ObjectManagerByteArrayOutputStream[] getBuffers()
                    throws ObjectManagerException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this,
                        cclass,
                        "getBuffers");

        ObjectManagerByteArrayOutputStream[] buffers = new ObjectManagerByteArrayOutputStream[1];

        // Create the buffer to contain the header for this log record.
        buffers[0] = new ObjectManagerByteArrayOutputStream(overhead);

        buffers[0].writeInt(LogRecord.TYPE_PADDING);
        buffers[0].writeInt(totalSize - overhead);

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this,
                       cclass,
                       "getBuffers",
                       new Object[] { buffers }
                            );
        return buffers;
    }
605164
@Override
    public byte[] getBuffer () {
        synchronized ( this.cache ) {
            byte[] buf;

            if ( this.freeBuffers > 0 ) {
                for ( int i = 0; i < this.cache.length; i++ ) {
                    if ( this.cache[ i ] != null ) {
                        buf = (byte[]) this.cache[ i ];
                        this.cache[ i ] = null;
                        this.freeBuffers--;
                        return buf;
                    }
                }
            }
            return new byte[this.bufferSize];
        }
    }
1176627
protected ImageLoader.Builder getBuilder() {
        // Get memory class of this device, exceeding this amount will throw an
        // OutOfMemory exception.
        ActivityManager am = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
        int memClass = am.getMemoryClass();

        // Use part of the available memory for memory cache.
        final int memoryCacheSize = 1024 * 1024 * memClass / getMemoryDivider();

        int diskCache = getDiskCacheSize();
        if (Logger.DEBUG) Log.d(TAG, "Using memory cache of size: " + humanReadableByteCount(memoryCacheSize, false));
        if (Logger.DEBUG) Log.d(TAG, "Using disk cache of size: " + humanReadableByteCount(diskCache, false));

        File cacheDir = IOUtil.getDiskCacheDir(this, getCacheFolderName());
        return new ImageLoader.Builder(this)
                .enableDiskCache(cacheDir, diskCache)
                .enableMemoryCache(memoryCacheSize);
    }
927211
public function getBuffer()
    {
        $currentPos = $this->getPosition();
        $this->setPosition(0, SEEK_SET);
        $buffer = stream_get_contents($this->stream);
        $this->setPosition($currentPos, SEEK_SET);
        return $buffer;
    }
48954
protected boolean isPooledBuffers()
   {
      if (tc.isEntryEnabled()) SibTr.entry(this, tc, "isPooledBuffers");
      if (tc.isEntryEnabled()) SibTr.exit(this, tc, "isPooledBuffers", ""+primaryHeaderFields.isPooled);
      return primaryHeaderFields.isPooled;
   }
93202
@Override
    public WsByteBuffer getRemainingData() {

        if (!isReadDataAvailable()) {
            return null;
        }

        WsByteBuffer retBuf = null;

        int position = getReadBuffer().position();
        int limit = getReadBuffer().limit();

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Current body buffer " + getReadBuffer());
        }

        if (0 == position && limit == getReadBuffer().capacity()) {
            // this is a full buff we can return
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Return a full buffer");
            }
            retBuf = returnLastBuffer();

        } else {
            // slice up a return
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Slice the return buffer");
            }
            // slice from the position set above
            retBuf = getReadBuffer().slice();

        }

        return retBuf;

    }
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);
	}
1203677
public TargetStreamManager getTargetStreamManager()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    {
      SibTr.entry(tc, "getTargetStreamManager");
      SibTr.exit(tc, "getTargetStreamManager", _targetStreamManager);
    }

    return _targetStreamManager;
  }
932242
public static ByteCodeGenerator createWithCurrentThreadContextClassLoader() {
        final ClassPool pool = ClassPool.getDefault();
        final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
        pool.appendClassPath(new LoaderClassPath(classLoader));
        return new ByteCodeGenerator(pool, classLoader);
    }
663215
private WsByteBuffer getBuffer() {
        WsByteBuffer buffer = this._output[this.outputIndex];
        if (null == buffer) {
            buffer = getNewByteBuffer();
            buffer.clear();
            this._output[this.outputIndex] = buffer;
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "getBuffer, new buffer -->" + buffer + " ,outputIndex -->" + this.outputIndex);
            }
        } else if (!buffer.hasRemaining()) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "getBuffer, buffer  -->" + buffer + " ,outputIndex -->" + this.outputIndex + " ,outputLength -->" + this._output.length);
            }
            buffer.flip();
            this.outputIndex++;
            // next array spot may or may not exist from previous iterations
            if (null == this._output[this.outputIndex]) {
                this._output[this.outputIndex] = getNewByteBuffer();
            }
            buffer = this._output[this.outputIndex];
            buffer.clear();
        }
        return buffer;
    }
769590
byte[] getBuffer()
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) {
            trace.entry(this,
                        cclass,
                        "getBuffer");
            trace.exit(this,
                       cclass,
                       "getBuffer",
                       "return length="
                                       + buf.length);
        }
        return buf;
    }
774149
protected function getMonologHandler()
    {
        return (new StreamHandler($this->path('storage', 'logs/netforce.log'), Logger::DEBUG))->setFormatter(new LineFormatter(null, null, true, true));
    }
1081768
public ConnectionPool getPool(String poolName)
            throws ConnectionPoolNotFoundException {
        ConnectionPool connectionPool = null;

        try {
            if (h_ConnectionPools.containsKey(poolName)) {
                connectionPool = h_ConnectionPools.get(poolName);
            } else {
                // Error: pool was never initialized or name could not be found
                throw new ConnectionPoolNotFoundException("Connection pool "
                        + "not found: " + poolName);
            }
        } catch (Throwable th) {
            throw new ConnectionPoolNotFoundException("The specified connection "
                    + "pool \""
                    + poolName
                    + "\" could not be found. The underlying "
                    + "error was a "
                    + th.getClass().getName()
                    + "The message was \""
                    + th.getMessage() + "\".");
        }

        return connectionPool;
    }
493241
protected function cachePool()
    {
        if ($this->cachePool === null) {
            throw new RuntimeException(sprintf(
                'Cache Pool is not defined for "%s"',
                get_class($this)
            ));
        }

        return $this->cachePool;
    }
156566
private function getPoolsSection()
    {
		$builder = new TreeBuilder();
        $node = $builder->root('pools');

        $node
			->addDefaultsIfNotSet()
			->children()
				->arrayNode('helper')
					->isRequired()
					->addDefaultsIfNotSet()
					->children()
						->variableNode('templates')->defaultValue([
							'_form.html' => 'EkynaSettingBundle:Admin/Helper:_form.html',
							'show.html'  => 'EkynaSettingBundle:Admin/Helper:show.html',
						])->end()
						->scalarNode('parent')->end()
						->scalarNode('entity')->defaultValue('Ekyna\Bundle\SettingBundle\Entity\Helper')->end()
						->scalarNode('controller')->defaultValue('Ekyna\Bundle\SettingBundle\Controller\Admin\HelperController')->end()
						->scalarNode('operator')->end()
						->scalarNode('repository')->defaultValue('Ekyna\Bundle\SettingBundle\Entity\HelperRepository')->end()
						->scalarNode('form')->defaultValue('Ekyna\Bundle\SettingBundle\Form\Type\HelperType')->end()
						->scalarNode('table')->defaultValue('Ekyna\Bundle\SettingBundle\Table\Type\HelperType')->end()
					->end()
				->end()
				->arrayNode('redirection')
					->isRequired()
					->addDefaultsIfNotSet()
					->children()
						->variableNode('templates')->defaultValue([
							'_form.html' => 'EkynaSettingBundle:Admin/Redirection:_form.html',
							'show.html'  => 'EkynaSettingBundle:Admin/Redirection:show.html',
						])->end()
						->scalarNode('parent')->end()
						->scalarNode('entity')->defaultValue('Ekyna\Bundle\SettingBundle\Entity\Redirection')->end()
						->scalarNode('controller')->defaultValue('Ekyna\Bundle\SettingBundle\Controller\Admin\RedirectionController')->end()
						->scalarNode('operator')->end()
						->scalarNode('repository')->defaultValue('Ekyna\Bundle\SettingBundle\Entity\RedirectionRepository')->end()
						->scalarNode('form')->defaultValue('Ekyna\Bundle\SettingBundle\Form\Type\RedirectionType')->end()
						->scalarNode('table')->defaultValue('Ekyna\Bundle\SettingBundle\Table\Type\RedirectionType')->end()
					->end()
				->end()
			->end()
        ;

        return $node;
    }