Class ByteBufferPool.NonPooling
java.lang.Object
org.eclipse.jetty.io.ByteBufferPool.NonPooling
- All Implemented Interfaces:
ByteBufferPool
- Enclosing interface:
ByteBufferPool
A ByteBufferPool that does not pool its
RetainableByteBuffers.
The returned RetainableByteBuffers are reference
counted.
RetainableByteBuffers returned by this class
are suitable to be wrapped in other Retainable
implementations that may delegate calls to
Retainable.retain().
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface ByteBufferPool
ByteBufferPool.Accumulator, ByteBufferPool.NonPooling, ByteBufferPool.Sized, ByteBufferPool.Wrapper -
Field Summary
Fields inherited from interface ByteBufferPool
NON_POOLING, SIZED_NON_POOLING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionacquire(int size, boolean direct) Acquires aRetainableByteBufferfrom this pool.voidclear()Removes allnon-retainedpooled instances from this pool.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ByteBufferPool
removeAndRelease
-
Constructor Details
-
NonPooling
public NonPooling()
-
-
Method Details
-
acquire
Description copied from interface:ByteBufferPoolAcquires a
RetainableByteBufferfrom this pool.- Specified by:
acquirein interfaceByteBufferPool- Parameters:
size- The size of the buffer. The returned buffer will have at least this capacity.direct- true if a direct memory buffer is needed, false otherwise.- Returns:
- a
RetainableByteBufferwith position and limit set to 0.
-
clear
public void clear()Description copied from interface:ByteBufferPoolRemoves all
non-retainedpooled instances from this pool.- Specified by:
clearin interfaceByteBufferPool
-