Package io.deephaven.chunk.util.pools
Interface ChunkPool
- All Known Implementing Classes:
ObjectChunkSoftPool
public interface ChunkPool
Interface for pools of
Chunk
s.-
Method Summary
Modifier and TypeMethodDescription<ATTR extends Any>
voidgiveResettableChunk
(@NotNull ResettableReadOnlyChunk<ATTR> resettableChunk) Return aResettableReadOnlyChunk
of to the pool.<ATTR extends Any>
voidgiveResettableWritableChunk
(@NotNull ResettableWritableChunk<ATTR> resettableWritableChunk) Return aResettableWritableChunk
of to the pool.<ATTR extends Any>
voidgiveWritableChunk
(@NotNull WritableChunk<ATTR> writableChunk) Return aWritableChunk
to the pool.<ATTR extends Any>
ResettableReadOnlyChunk<ATTR>Take aResettableReadOnlyChunk
.<ATTR extends Any>
ResettableWritableChunk<ATTR>Take aResettableWritableChunk
.<ATTR extends Any>
WritableChunk<ATTR>takeWritableChunk
(int capacity) Take aWritableChunk
of at least the specifiedcapacity
.
-
Method Details
-
takeWritableChunk
Take aWritableChunk
of at least the specifiedcapacity
. The result belongs to the caller until released.- Parameters:
capacity
- The minimum capacity for the result- Returns:
- A
WritableChunk
of at least the specifiedcapacity
that belongs to the caller until released
-
giveWritableChunk
Return aWritableChunk
to the pool.- Parameters:
writableChunk
- The chunk to give
-
takeResettableChunk
Take aResettableReadOnlyChunk
. The result belongs to the caller until released.- Returns:
- A
ResettableReadOnlyChunk
that belongs to the caller until released
-
giveResettableChunk
<ATTR extends Any> void giveResettableChunk(@NotNull @NotNull ResettableReadOnlyChunk<ATTR> resettableChunk) Return aResettableReadOnlyChunk
of to the pool.- Parameters:
resettableChunk
- The chunk to give
-
takeResettableWritableChunk
Take aResettableWritableChunk
. The result belongs to the caller until released.- Returns:
- A
ResettableWritableChunk
that belongs to the caller until released
-
giveResettableWritableChunk
<ATTR extends Any> void giveResettableWritableChunk(@NotNull @NotNull ResettableWritableChunk<ATTR> resettableWritableChunk) Return aResettableWritableChunk
of to the pool.- Parameters:
resettableWritableChunk
- The chunk to give
-