Package io.deephaven.chunk.util.pools
Class CharChunkSoftPool
java.lang.Object
io.deephaven.chunk.util.pools.CharChunkSoftPool
- All Implemented Interfaces:
CharChunkPool
CharChunkPool
implementation that pools chunks of chars in a data structure that only enforces soft
reachability.-
Method Summary
Modifier and TypeMethodDescription<ATTR extends Any>
ResettableCharChunk<ATTR>Take aResettableCharChunk
.<ATTR extends Any>
ResettableWritableCharChunk<ATTR>Take aResettableWritableCharChunk
.<ATTR extends Any>
WritableCharChunk<ATTR>takeWritableCharChunk
(int capacity) Take aWritableCharChunk
of at least the specifiedcapacity
.
-
Method Details
-
asChunkPool
- Specified by:
asChunkPool
in interfaceCharChunkPool
- Returns:
- This CharChunkPool as a
ChunkPool
. This is useful for passing this pool to methods that expect aChunkPool
but do not need to know the specific type.
-
takeWritableCharChunk
Description copied from interface:CharChunkPool
Take aWritableCharChunk
of at least the specifiedcapacity
. The result belongs to the caller untilclosed
.- Specified by:
takeWritableCharChunk
in interfaceCharChunkPool
- Parameters:
capacity
- The minimum capacity for the result- Returns:
- A
WritableCharChunk
of at least the specifiedcapacity
that belongs to the caller untilclosed
-
takeResettableCharChunk
Description copied from interface:CharChunkPool
Take aResettableCharChunk
. The result belongs to the caller untilclosed
.- Specified by:
takeResettableCharChunk
in interfaceCharChunkPool
- Returns:
- A
ResettableCharChunk
that belongs to the caller untilclosed
-
takeResettableWritableCharChunk
Description copied from interface:CharChunkPool
Take aResettableWritableCharChunk
. The result belongs to the caller untilclosed
.- Specified by:
takeResettableWritableCharChunk
in interfaceCharChunkPool
- Returns:
- A
ResettableWritableCharChunk
that belongs to the caller untilclosed
-