Package io.deephaven.chunk.util.pools
Class ByteChunkSoftPool
java.lang.Object
io.deephaven.chunk.util.pools.ByteChunkSoftPool
- All Implemented Interfaces:
ByteChunkPool
ByteChunkPool implementation that pools chunks of bytes in a data structure that only enforces soft
reachability.-
Method Summary
Modifier and TypeMethodDescription<ATTR extends Any>
ResettableByteChunk<ATTR>Take aResettableByteChunk.<ATTR extends Any>
ResettableWritableByteChunk<ATTR>Take aResettableWritableByteChunk.<ATTR extends Any>
WritableByteChunk<ATTR>takeWritableByteChunk(int capacity) Take aWritableByteChunkof at least the specifiedcapacity.
-
Method Details
-
asChunkPool
- Specified by:
asChunkPoolin interfaceByteChunkPool- Returns:
- This ByteChunkPool as a
ChunkPool. This is useful for passing this pool to methods that expect aChunkPoolbut do not need to know the specific type.
-
takeWritableByteChunk
Description copied from interface:ByteChunkPoolTake aWritableByteChunkof at least the specifiedcapacity. The result belongs to the caller untilclosed.- Specified by:
takeWritableByteChunkin interfaceByteChunkPool- Parameters:
capacity- The minimum capacity for the result- Returns:
- A
WritableByteChunkof at least the specifiedcapacitythat belongs to the caller untilclosed
-
takeResettableByteChunk
Description copied from interface:ByteChunkPoolTake aResettableByteChunk. The result belongs to the caller untilclosed.- Specified by:
takeResettableByteChunkin interfaceByteChunkPool- Returns:
- A
ResettableByteChunkthat belongs to the caller untilclosed
-
takeResettableWritableByteChunk
Description copied from interface:ByteChunkPoolTake aResettableWritableByteChunk. The result belongs to the caller untilclosed.- Specified by:
takeResettableWritableByteChunkin interfaceByteChunkPool- Returns:
- A
ResettableWritableByteChunkthat belongs to the caller untilclosed
-