Package org.eclipse.jetty.io
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 org.eclipse.jetty.io.ByteBufferPool
ByteBufferPool.Accumulator, ByteBufferPool.NonPooling, ByteBufferPool.Sized, ByteBufferPool.Wrapper
-
Field Summary
Fields inherited from interface org.eclipse.jetty.io.ByteBufferPool
NON_POOLING, SIZED_NON_POOLING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionacquire
(int size, boolean direct) Acquires aRetainableByteBuffer
from this pool.void
clear()
Removes allnon-retained
pooled instances from this pool.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.io.ByteBufferPool
removeAndRelease
-
Constructor Details
-
Wrapper
-
-
Method Details
-
getWrapped
-
acquire
Description copied from interface:ByteBufferPool
Acquires a
RetainableByteBuffer
from this pool.- Specified by:
acquire
in 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
RetainableByteBuffer
with position and limit set to 0.
-
clear
public void clear()Description copied from interface:ByteBufferPool
Removes all
non-retained
pooled instances from this pool.- Specified by:
clear
in interfaceByteBufferPool
-