java.lang.Object
org.eclipse.jetty.io.NullByteBufferPool
- All Implemented Interfaces:
ByteBufferPool
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.ByteBufferPool
ByteBufferPool.Bucket, ByteBufferPool.Lease -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionacquire(int size, boolean direct) Requests aByteBufferof the given size.voidrelease(ByteBuffer buffer) Returns aByteBuffer, usually obtained withByteBufferPool.acquire(int, boolean)(but not necessarily), making it available for recycling and reuse.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.jetty.io.ByteBufferPool
newByteBuffer, remove
-
Constructor Details
-
NullByteBufferPool
public NullByteBufferPool()
-
-
Method Details
-
acquire
Description copied from interface:ByteBufferPoolRequests a
ByteBufferof the given size.The returned buffer may have a bigger capacity than the size being requested but it will have the limit set to the given size.
- Specified by:
acquirein interfaceByteBufferPool- Parameters:
size- the size of the bufferdirect- whether the buffer must be direct or not- Returns:
- the requested buffer
- See Also:
-
release
Description copied from interface:ByteBufferPoolReturns a
ByteBuffer, usually obtained withByteBufferPool.acquire(int, boolean)(but not necessarily), making it available for recycling and reuse.- Specified by:
releasein interfaceByteBufferPool- Parameters:
buffer- the buffer to return- See Also:
-