Class ByteBufferPool.Wrapper
java.lang.Object
org.eclipse.jetty.io.ByteBufferPool.Wrapper
- All Implemented Interfaces:
ByteBufferPool
- Direct Known Subclasses:
ByteBufferPool.Sized
- Enclosing interface:
ByteBufferPool
A wrapper for ByteBufferPool instances.
-
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
-
Wrapper
-
-
Method Details
-
getWrapped
-
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
-