Package org.eclipse.jetty.io
Class ByteBufferPool.Sized
java.lang.Object
org.eclipse.jetty.io.ByteBufferPool.Wrapper
org.eclipse.jetty.io.ByteBufferPool.Sized
- All Implemented Interfaces:
ByteBufferPool
- Enclosing interface:
- ByteBufferPool
A ByteBufferPool with an additional no-args
acquire()
method to obtain a buffer of a
preconfigured specific size and type.-
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
ConstructorDescriptionSized
(ByteBufferPool wrapped) Create a sized pool for non direct buffers of a default size from a wrapped pool.Sized
(ByteBufferPool wrapped, boolean direct, int size) Create a sized pool for a give directness and size from a wrapped pool. -
Method Summary
Methods inherited from class org.eclipse.jetty.io.ByteBufferPool.Wrapper
acquire, clear, getWrapped
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
-
Sized
Create a sized pool for non direct buffers of a default size from a wrapped pool.- Parameters:
wrapped
- The actualByteBufferPool
-
Sized
Create a sized pool for a give directness and size from a wrapped pool.- Parameters:
wrapped
- The actualByteBufferPool
direct
-true
for direct buffers.size
- The specified size in bytes of the buffer, or -1 for a default
-
-
Method Details
-
isDirect
public boolean isDirect() -
getSize
public int getSize() -
acquire
- Returns:
- A
RetainableByteBuffer
suitable for the specified preconfigured size and type.
-