Package org.glassfish.grizzly.memory
Class ByteBufferManager.SmallByteBufferWrapper
- java.lang.Object
-
- org.glassfish.grizzly.memory.ByteBufferWrapper
-
- org.glassfish.grizzly.memory.ByteBufferManager.SmallByteBufferWrapper
-
- All Implemented Interfaces:
Comparable<Buffer>,WritableMessage,Buffer,Cacheable
- Enclosing class:
- ByteBufferManager
protected final class ByteBufferManager.SmallByteBufferWrapper extends ByteBufferWrapper implements Cacheable
ByteBufferWrapperimplementation, which supports trimming. In other words it's possible to return unusedBufferspace to pool.
-
-
Field Summary
-
Fields inherited from class org.glassfish.grizzly.memory.ByteBufferWrapper
allowBufferDispose, DEBUG_MODE, disposeStackTrace, mark, visible
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Notify the allocator that the space for this Buffer is no longer needed.voidrecycle()protected ByteBufferWrapperwrapByteBuffer(ByteBuffer byteBuffer)-
Methods inherited from class org.glassfish.grizzly.memory.ByteBufferWrapper
allowBufferDispose, allowBufferDispose, array, arrayOffset, asReadOnlyBuffer, capacity, checkDispose, clear, compact, compareTo, dumpHex, duplicate, equals, flip, get, get, get, get, get, get, getChar, getChar, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getShort, getShort, hasArray, hashCode, hasRemaining, isComposite, isDirect, isExternal, isReadOnly, limit, limit, mark, order, order, position, position, prepareDispose, prepend, put, put, put, put, put, put, put, put, put8BitString, putChar, putChar, putDouble, putDouble, putFloat, putFloat, putInt, putInt, putLong, putLong, putShort, putShort, release, remaining, reset, rewind, shrink, slice, slice, split, toBufferArray, toBufferArray, toBufferArray, toBufferArray, toByteBuffer, toByteBuffer, toByteBufferArray, toByteBufferArray, toByteBufferArray, toByteBufferArray, toString, toStringContent, toStringContent, toStringContent, trim, tryDispose, underlying
-
-
-
-
Method Detail
-
dispose
public void dispose()
Description copied from interface:BufferNotify the allocator that the space for this Buffer is no longer needed. All calls to methods on a Buffer will fail after a call to dispose().- Specified by:
disposein interfaceBuffer- Overrides:
disposein classByteBufferWrapper
-
wrapByteBuffer
protected ByteBufferWrapper wrapByteBuffer(ByteBuffer byteBuffer)
- Overrides:
wrapByteBufferin classByteBufferWrapper
-
-