Package io.deephaven.chunk.util.pools
Class ShortChunkSoftPool
java.lang.Object
io.deephaven.chunk.util.pools.ShortChunkSoftPool
- All Implemented Interfaces:
ShortChunkPool
ShortChunkPool
implementation that pools chunks of shorts in a data structure that only enforces soft
reachability.-
Method Summary
Modifier and TypeMethodDescription<ATTR extends Any>
ResettableShortChunk<ATTR>Take aResettableShortChunk
.<ATTR extends Any>
ResettableWritableShortChunk<ATTR>Take aResettableWritableShortChunk
.<ATTR extends Any>
WritableShortChunk<ATTR>takeWritableShortChunk
(int capacity) Take aWritableShortChunk
of at least the specifiedcapacity
.
-
Method Details
-
asChunkPool
- Specified by:
asChunkPool
in interfaceShortChunkPool
- Returns:
- This ShortChunkPool as a
ChunkPool
. This is useful for passing this pool to methods that expect aChunkPool
but do not need to know the specific type.
-
takeWritableShortChunk
Description copied from interface:ShortChunkPool
Take aWritableShortChunk
of at least the specifiedcapacity
. The result belongs to the caller untilclosed
.- Specified by:
takeWritableShortChunk
in interfaceShortChunkPool
- Parameters:
capacity
- The minimum capacity for the result- Returns:
- A
WritableShortChunk
of at least the specifiedcapacity
that belongs to the caller untilclosed
-
takeResettableShortChunk
Description copied from interface:ShortChunkPool
Take aResettableShortChunk
. The result belongs to the caller untilclosed
.- Specified by:
takeResettableShortChunk
in interfaceShortChunkPool
- Returns:
- A
ResettableShortChunk
that belongs to the caller untilclosed
-
takeResettableWritableShortChunk
Description copied from interface:ShortChunkPool
Take aResettableWritableShortChunk
. The result belongs to the caller untilclosed
.- Specified by:
takeResettableWritableShortChunk
in interfaceShortChunkPool
- Returns:
- A
ResettableWritableShortChunk
that belongs to the caller untilclosed
-