/** * Returns the default {@link SslBufferPool} used when no pool is * specified in the constructor. */ public static synchronized SslBufferPool getDefaultBufferPool() { if (defaultBufferPool == null) { defaultBufferPool = new SslBufferPool(); } return defaultBufferPool; }
final ByteBuffer buf = bufPool.acquireBuffer(); try { assert buf.isDirect(); bufPool.releaseBuffer(buf);
preallocated = allocate(maxBufferCount * MAX_PACKET_SIZE_ALIGNED); numAllocations = null; for (int i = 0; i < maxBufferCount; i ++) {
final ByteBuffer buf = bufPool.acquireBuffer(); try { assert buf.isDirect(); bufPool.releaseBuffer(buf);
buf = allocate(OpenSslEngine.MAX_ENCRYPTED_PACKET_LENGTH);
final ByteBuffer buf = bufPool.acquireBuffer(); try { assert buf.isDirect(); bufPool.releaseBuffer(buf);
@Override SslBufferPool newBufferPool() { return new SslBufferPool(true, true); }
final ByteBuffer buf = bufPool.acquireBuffer(); try { assert buf.isDirect(); bufPool.releaseBuffer(buf);
SslBufferPool newBufferPool() { return new SslBufferPool(false, false); }
private void wrap(ChannelHandlerContext context, Channel channel) throws SSLException { ChannelBuffer msg; ByteBuffer outNetBuf = bufferPool.acquireBuffer(); boolean success = true; boolean offered = false; throw e; } finally { bufferPool.releaseBuffer(outNetBuf);
bufferPool = new ThreadLocalSslBufferPool(maxSslBufferBytes, preallocateSslBuffer, true); } else { bufferPool = new SslBufferPool(maxSslBufferBytes, preallocateSslBuffer, true);
private ChannelFuture wrapNonAppData(ChannelHandlerContext ctx, Channel channel) throws SSLException { ChannelFuture future = null; ByteBuffer outNetBuf = bufferPool.acquireBuffer(); throw e; } finally { bufferPool.releaseBuffer(outNetBuf);
final ByteBuffer nioOutAppBuf = bufferPool.acquireBuffer(); throw e; } finally { bufferPool.releaseBuffer(nioOutAppBuf);