Class RetainableByteBuffer

java.lang.Object
org.eclipse.jetty.io.RetainableByteBuffer
All Implemented Interfaces:
Retainable

public class RetainableByteBuffer extends Object implements Retainable

A pooled ByteBuffer which maintains a reference count that is incremented with retain() and decremented with release(). The buffer is released to the pool when release() is called one more time than retain().

A RetainableByteBuffer can either be:

Calling release() on a out of pool and retained instance does not re-pool it while that re-pools it on a out of pool but not retained instance.