Package io.deephaven.chunk.util.pools
Class IntChunkSoftPool
java.lang.Object
io.deephaven.chunk.util.pools.IntChunkSoftPool
- All Implemented Interfaces:
IntChunkPool
IntChunkPool
implementation that pools chunks of ints in a data structure that only enforces soft
reachability.-
Method Summary
Modifier and TypeMethodDescription<ATTR extends Any>
ResettableIntChunk<ATTR>Take aResettableIntChunk
.<ATTR extends Any>
ResettableWritableIntChunk<ATTR>Take aResettableWritableIntChunk
.<ATTR extends Any>
WritableIntChunk<ATTR>takeWritableIntChunk
(int capacity) Take aWritableIntChunk
of at least the specifiedcapacity
.
-
Method Details
-
asChunkPool
- Specified by:
asChunkPool
in interfaceIntChunkPool
- Returns:
- This IntChunkPool as a
ChunkPool
. This is useful for passing this pool to methods that expect aChunkPool
but do not need to know the specific type.
-
takeWritableIntChunk
Description copied from interface:IntChunkPool
Take aWritableIntChunk
of at least the specifiedcapacity
. The result belongs to the caller untilclosed
.- Specified by:
takeWritableIntChunk
in interfaceIntChunkPool
- Parameters:
capacity
- The minimum capacity for the result- Returns:
- A
WritableIntChunk
of at least the specifiedcapacity
that belongs to the caller untilclosed
-
takeResettableIntChunk
Description copied from interface:IntChunkPool
Take aResettableIntChunk
. The result belongs to the caller untilclosed
.- Specified by:
takeResettableIntChunk
in interfaceIntChunkPool
- Returns:
- A
ResettableIntChunk
that belongs to the caller untilclosed
-
takeResettableWritableIntChunk
Description copied from interface:IntChunkPool
Take aResettableWritableIntChunk
. The result belongs to the caller untilclosed
.- Specified by:
takeResettableWritableIntChunk
in interfaceIntChunkPool
- Returns:
- A
ResettableWritableIntChunk
that belongs to the caller untilclosed
-