Interface InternalBuffer
- All Superinterfaces:
IBuffer
Internal buffer contract for storage that can be associated with a provider and terminally disposed.
IBuffer.release() relinquishes the current lease and may return storage to the associated provider for reuse.
dispose() ends the storage lifetime permanently; a disposed buffer cannot be cleared or reused. External
buffers can implement IBuffer without implementing this internal pooled-storage contract.
- Author:
- Eike Stepper
- No Implement
- This interface is not intended to be implemented by clients.
- No Extend
- This interface is not intended to be extended by clients.
-
Field Summary
Fields inherited from interface IBuffer
CHANNEL_ID_BYTES, CHANNEL_ID_POS, HEADER_SIZE, MAX_CHANNEL, MIN_CHANNEL, NO_CHANNEL, PAYLOAD_SIZE_BYTES, PAYLOAD_SIZE_POS -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Permanently disposes this buffer's storage.Returns the provider associated with this internal buffer.voidsetBufferProvider(IBufferProvider bufferProvider) Methods inherited from interface IBuffer
clear, compact, flip, formatContent, get, get, getByteBuffer, getCapacity, getChannelID, getErrorHandler, getInt, getLimit, getPosition, getShort, getState, getString, hasRemaining, isCCAM, isEOS, put, put, putShort, release, setCCAM, setEOS, setErrorHandler, setLimit, setPosition, startGetting, startPutting, write
-
Method Details
-
getBufferProvider
IBufferProvider getBufferProvider()Returns the provider associated with this internal buffer.- Specified by:
getBufferProviderin interfaceIBuffer- Returns:
- The current provider, or
nullif no provider is associated.
-
setBufferProvider
-
dispose
void dispose()Permanently disposes this buffer's storage. This is distinct fromIBuffer.release(), which may return a reusable buffer to its provider.
-