Package io.deephaven.chunk.util.pools
Class LongChunkSoftPool
java.lang.Object
io.deephaven.chunk.util.pools.LongChunkSoftPool
- All Implemented Interfaces:
LongChunkPool
LongChunkPool
implementation that pools chunks of longs in a data structure that only enforces soft
reachability.-
Method Summary
Modifier and TypeMethodDescription<ATTR extends Any>
ResettableLongChunk<ATTR>Take aResettableLongChunk
.<ATTR extends Any>
ResettableWritableLongChunk<ATTR>Take aResettableWritableLongChunk
.<ATTR extends Any>
WritableLongChunk<ATTR>takeWritableLongChunk
(int capacity) Take aWritableLongChunk
of at least the specifiedcapacity
.
-
Method Details
-
asChunkPool
- Specified by:
asChunkPool
in interfaceLongChunkPool
- Returns:
- This LongChunkPool as a
ChunkPool
. This is useful for passing this pool to methods that expect aChunkPool
but do not need to know the specific type.
-
takeWritableLongChunk
Description copied from interface:LongChunkPool
Take aWritableLongChunk
of at least the specifiedcapacity
. The result belongs to the caller untilclosed
.- Specified by:
takeWritableLongChunk
in interfaceLongChunkPool
- Parameters:
capacity
- The minimum capacity for the result- Returns:
- A
WritableLongChunk
of at least the specifiedcapacity
that belongs to the caller untilclosed
-
takeResettableLongChunk
Description copied from interface:LongChunkPool
Take aResettableLongChunk
. The result belongs to the caller untilclosed
.- Specified by:
takeResettableLongChunk
in interfaceLongChunkPool
- Returns:
- A
ResettableLongChunk
that belongs to the caller untilclosed
-
takeResettableWritableLongChunk
Description copied from interface:LongChunkPool
Take aResettableWritableLongChunk
. The result belongs to the caller untilclosed
.- Specified by:
takeResettableWritableLongChunk
in interfaceLongChunkPool
- Returns:
- A
ResettableWritableLongChunk
that belongs to the caller untilclosed
-