Package io.deephaven.chunk.util.pools
Class ObjectChunkSoftPool
java.lang.Object
io.deephaven.chunk.util.pools.ObjectChunkSoftPool
- All Implemented Interfaces:
ObjectChunkPool
ObjectChunkPool implementation that pools chunks of Objects in a data structure that only enforces soft
reachability.-
Method Summary
Modifier and TypeMethodDescription<TYPE,ATTR extends Any>
ResettableObjectChunk<TYPE,ATTR> Take aResettableObjectChunkof at least the specifiedcapacity.<TYPE,ATTR extends Any>
ResettableWritableObjectChunk<TYPE,ATTR> Take aResettableWritableObjectChunkof at least the specifiedcapacity.<TYPE,ATTR extends Any>
WritableObjectChunk<TYPE,ATTR> takeWritableObjectChunk(int capacity) Take aWritableObjectChunkof at least the specifiedcapacity.
-
Method Details
-
asChunkPool
- Specified by:
asChunkPoolin interfaceObjectChunkPool- Returns:
- This ObjectChunkPool as a
ChunkPool. This is useful for passing this pool to methods that expect aChunkPoolbut do not need to know the specific type.
-
takeWritableObjectChunk
public <TYPE,ATTR extends Any> WritableObjectChunk<TYPE,ATTR> takeWritableObjectChunk(int capacity) Description copied from interface:ObjectChunkPoolTake aWritableObjectChunkof at least the specifiedcapacity. The result belongs to the caller untilclosed.- Specified by:
takeWritableObjectChunkin interfaceObjectChunkPool- Parameters:
capacity- The minimum capacity for the result- Returns:
- A
WritableObjectChunkof at least the specifiedcapacitythat belongs to the caller untilclosed
-
takeResettableObjectChunk
Description copied from interface:ObjectChunkPoolTake aResettableObjectChunkof at least the specifiedcapacity. The result belongs to the caller untilclosed.- Specified by:
takeResettableObjectChunkin interfaceObjectChunkPool- Returns:
- A
ResettableObjectChunkof at least the specifiedcapacitythat belongs to the caller untilclosed
-
takeResettableWritableObjectChunk
public <TYPE,ATTR extends Any> ResettableWritableObjectChunk<TYPE,ATTR> takeResettableWritableObjectChunk()Description copied from interface:ObjectChunkPoolTake aResettableWritableObjectChunkof at least the specifiedcapacity. The result belongs to the caller untilclosed.- Specified by:
takeResettableWritableObjectChunkin interfaceObjectChunkPool- Returns:
- A
ResettableWritableObjectChunkof at least the specifiedcapacitythat belongs to the caller untilclosed
-