Returns a {@link ByteBuffer}, usually obtained with {@link #acquire(int,boolean)}(but not necessarily), making it available for recycling and reuse.
6970717273747576777879
{ if (readAndParse()) { HttpClient client = getHttpDestination().getHttpClient(); ByteBufferPool bufferPool = client.getByteBufferPool(); bufferPool.release(buffer); // Don't linger the buffer around if we are idle. buffer = null; } }
110111112113114115116117118119120
{ if (readAndParse()) { HttpClient client = destination.getHttpClient(); ByteBufferPool bufferPool = client.getByteBufferPool(); bufferPool.release(buffer); // Don't linger the buffer around if we are idle. buffer = null; } }
99100101102103104105106107108109
LOG.debug(x); // TODO: fail and close ? } finally { bufferPool.release(buffer); } } private void parse(ByteBuffer buffer) {
114115116117118119120121122123124
{ LOG.warn(e); } finally { bufferPool.release(buf); } } public void setSlowness(int slowness) {
133134135136137138139140141142143
onContent(new HttpInput.Content(copy) { @Override public void succeeded() { byteBufferPool.release(copy); callback.succeeded(); } @Override public void failed(Throwable x)
140141142143144145146147148149150
} @Override public void failed(Throwable x) { byteBufferPool.release(copy); callback.failed(x); } }); if (frame.isEndStream())
104105106107108109110111112113114
LOG.debug(x); failAndClose(x); } finally { bufferPool.release(buffer); } } private void parse(ByteBuffer buffer) {