Package io.deephaven.chunk.util.pools
Class ObjectChunkSoftPool
java.lang.Object
io.deephaven.chunk.util.pools.ObjectChunkSoftPool
- All Implemented Interfaces:
ChunkPool
,ObjectChunkPool
ChunkPool
implementation for chunks of objects.-
Method Summary
Modifier and TypeMethodDescription<ATTR extends Any>
voidgiveResettableChunk
(@NotNull ResettableReadOnlyChunk<ATTR> resettableChunk) Return aResettableReadOnlyChunk
of to the pool.void
giveResettableObjectChunk
(@NotNull ResettableObjectChunk resettableObjectChunk) <ATTR extends Any>
voidgiveResettableWritableChunk
(@NotNull ResettableWritableChunk<ATTR> resettableWritableChunk) Return aResettableWritableChunk
of to the pool.void
giveResettableWritableObjectChunk
(@NotNull ResettableWritableObjectChunk resettableWritableObjectChunk) <ATTR extends Any>
voidgiveWritableChunk
(@NotNull WritableChunk<ATTR> writableChunk) Return aWritableChunk
to the pool.void
giveWritableObjectChunk
(@NotNull WritableObjectChunk<?, ?> writableObjectChunk) <ATTR extends Any>
ResettableReadOnlyChunk<ATTR>Take aResettableReadOnlyChunk
.<TYPE,
ATTR extends Any>
ResettableObjectChunk<TYPE,ATTR> <ATTR extends Any>
ResettableWritableChunk<ATTR>Take aResettableWritableChunk
.<TYPE,
ATTR extends Any>
ResettableWritableObjectChunk<TYPE,ATTR> <ATTR extends Any>
WritableChunk<ATTR>takeWritableChunk
(int capacity) Take aWritableChunk
of at least the specifiedcapacity
.<TYPE,
ATTR extends Any>
WritableObjectChunk<TYPE,ATTR> takeWritableObjectChunk
(int capacity)
-
Method Details
-
asChunkPool
- Specified by:
asChunkPool
in interfaceObjectChunkPool
-
takeWritableChunk
Description copied from interface:ChunkPool
Take aWritableChunk
of at least the specifiedcapacity
. The result belongs to the caller until released.- Specified by:
takeWritableChunk
in interfaceChunkPool
- Parameters:
capacity
- The minimum capacity for the result- Returns:
- A
WritableChunk
of at least the specifiedcapacity
that belongs to the caller until released
-
giveWritableChunk
public <ATTR extends Any> void giveWritableChunk(@NotNull @NotNull WritableChunk<ATTR> writableChunk) Description copied from interface:ChunkPool
Return aWritableChunk
to the pool.- Specified by:
giveWritableChunk
in interfaceChunkPool
- Parameters:
writableChunk
- The chunk to give
-
takeResettableChunk
Description copied from interface:ChunkPool
Take aResettableReadOnlyChunk
. The result belongs to the caller until released.- Specified by:
takeResettableChunk
in interfaceChunkPool
- Returns:
- A
ResettableReadOnlyChunk
that belongs to the caller until released
-
giveResettableChunk
public <ATTR extends Any> void giveResettableChunk(@NotNull @NotNull ResettableReadOnlyChunk<ATTR> resettableChunk) Description copied from interface:ChunkPool
Return aResettableReadOnlyChunk
of to the pool.- Specified by:
giveResettableChunk
in interfaceChunkPool
- Parameters:
resettableChunk
- The chunk to give
-
takeResettableWritableChunk
Description copied from interface:ChunkPool
Take aResettableWritableChunk
. The result belongs to the caller until released.- Specified by:
takeResettableWritableChunk
in interfaceChunkPool
- Returns:
- A
ResettableWritableChunk
that belongs to the caller until released
-
giveResettableWritableChunk
public <ATTR extends Any> void giveResettableWritableChunk(@NotNull @NotNull ResettableWritableChunk<ATTR> resettableWritableChunk) Description copied from interface:ChunkPool
Return aResettableWritableChunk
of to the pool.- Specified by:
giveResettableWritableChunk
in interfaceChunkPool
- Parameters:
resettableWritableChunk
- The chunk to give
-
takeWritableObjectChunk
public <TYPE,ATTR extends Any> WritableObjectChunk<TYPE,ATTR> takeWritableObjectChunk(int capacity) - Specified by:
takeWritableObjectChunk
in interfaceObjectChunkPool
-
giveWritableObjectChunk
- Specified by:
giveWritableObjectChunk
in interfaceObjectChunkPool
-
takeResettableObjectChunk
- Specified by:
takeResettableObjectChunk
in interfaceObjectChunkPool
-
giveResettableObjectChunk
public void giveResettableObjectChunk(@NotNull @NotNull ResettableObjectChunk resettableObjectChunk) - Specified by:
giveResettableObjectChunk
in interfaceObjectChunkPool
-
takeResettableWritableObjectChunk
public <TYPE,ATTR extends Any> ResettableWritableObjectChunk<TYPE,ATTR> takeResettableWritableObjectChunk()- Specified by:
takeResettableWritableObjectChunk
in interfaceObjectChunkPool
-
giveResettableWritableObjectChunk
public void giveResettableWritableObjectChunk(@NotNull @NotNull ResettableWritableObjectChunk resettableWritableObjectChunk) - Specified by:
giveResettableWritableObjectChunk
in interfaceObjectChunkPool
-