Package io.deephaven.chunk.util.pools
Class MultiChunkPool
java.lang.Object
io.deephaven.chunk.util.pools.MultiChunkPool
- All Implemented Interfaces:
BooleanChunkPool,ByteChunkPool,CharChunkPool,DoubleChunkPool,FloatChunkPool,IntChunkPool,LongChunkPool,ObjectChunkPool,ShortChunkPool
public final class MultiChunkPool
extends Object
implements BooleanChunkPool, ByteChunkPool, CharChunkPool, ShortChunkPool, IntChunkPool, LongChunkPool, FloatChunkPool, DoubleChunkPool, ObjectChunkPool
Provides a set of per-type
ChunkPools. Normally accessed via a ThreadLocal, to allow some threads to
share a common pool and others to allocate their own.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic MultiChunkPoolgetChunkPool(@NotNull ChunkType chunkType) <ATTR extends Any>
ResettableBooleanChunk<ATTR>Take aResettableBooleanChunk.<ATTR extends Any>
ResettableByteChunk<ATTR>Take aResettableByteChunk.<ATTR extends Any>
ResettableCharChunk<ATTR>Take aResettableCharChunk.<ATTR extends Any>
ResettableDoubleChunk<ATTR>Take aResettableDoubleChunk.<ATTR extends Any>
ResettableFloatChunk<ATTR>Take aResettableFloatChunk.<ATTR extends Any>
ResettableIntChunk<ATTR>Take aResettableIntChunk.<ATTR extends Any>
ResettableLongChunk<ATTR>Take aResettableLongChunk.<TYPE,ATTR extends Any>
ResettableObjectChunk<TYPE,ATTR> Take aResettableObjectChunkof at least the specifiedcapacity.<ATTR extends Any>
ResettableShortChunk<ATTR>Take aResettableShortChunk.<ATTR extends Any>
ResettableWritableBooleanChunk<ATTR>Take aResettableWritableBooleanChunk.<ATTR extends Any>
ResettableWritableByteChunk<ATTR>Take aResettableWritableByteChunk.<ATTR extends Any>
ResettableWritableCharChunk<ATTR>Take aResettableWritableCharChunk.<ATTR extends Any>
ResettableWritableDoubleChunk<ATTR>Take aResettableWritableDoubleChunk.<ATTR extends Any>
ResettableWritableFloatChunk<ATTR>Take aResettableWritableFloatChunk.<ATTR extends Any>
ResettableWritableIntChunk<ATTR>Take aResettableWritableIntChunk.<ATTR extends Any>
ResettableWritableLongChunk<ATTR>Take aResettableWritableLongChunk.<TYPE,ATTR extends Any>
ResettableWritableObjectChunk<TYPE,ATTR> Take aResettableWritableObjectChunkof at least the specifiedcapacity.<ATTR extends Any>
ResettableWritableShortChunk<ATTR>Take aResettableWritableShortChunk.<ATTR extends Any>
WritableBooleanChunk<ATTR>takeWritableBooleanChunk(int capacity) Take aWritableBooleanChunkof at least the specifiedcapacity.<ATTR extends Any>
WritableByteChunk<ATTR>takeWritableByteChunk(int capacity) Take aWritableByteChunkof at least the specifiedcapacity.<ATTR extends Any>
WritableCharChunk<ATTR>takeWritableCharChunk(int capacity) Take aWritableCharChunkof at least the specifiedcapacity.<ATTR extends Any>
WritableDoubleChunk<ATTR>takeWritableDoubleChunk(int capacity) Take aWritableDoubleChunkof at least the specifiedcapacity.<ATTR extends Any>
WritableFloatChunk<ATTR>takeWritableFloatChunk(int capacity) Take aWritableFloatChunkof at least the specifiedcapacity.<ATTR extends Any>
WritableIntChunk<ATTR>takeWritableIntChunk(int capacity) Take aWritableIntChunkof at least the specifiedcapacity.<ATTR extends Any>
WritableLongChunk<ATTR>takeWritableLongChunk(int capacity) Take aWritableLongChunkof at least the specifiedcapacity.<TYPE,ATTR extends Any>
WritableObjectChunk<TYPE,ATTR> takeWritableObjectChunk(int capacity) Take aWritableObjectChunkof at least the specifiedcapacity.<ATTR extends Any>
WritableShortChunk<ATTR>takeWritableShortChunk(int capacity) Take aWritableShortChunkof at least the specifiedcapacity.
-
Method Details
-
enableDedicatedPoolForThisThread
public static void enableDedicatedPoolForThisThread() -
forThisThread
-
getChunkPool
-
getBooleanChunkPool
-
getCharChunkPool
-
getByteChunkPool
-
getShortChunkPool
-
getIntChunkPool
-
getLongChunkPool
-
getFloatChunkPool
-
getDoubleChunkPool
-
getObjectChunkPool
-
asChunkPool
- Specified by:
asChunkPoolin interfaceBooleanChunkPool- Specified by:
asChunkPoolin interfaceByteChunkPool- Specified by:
asChunkPoolin interfaceCharChunkPool- Specified by:
asChunkPoolin interfaceDoubleChunkPool- Specified by:
asChunkPoolin interfaceFloatChunkPool- Specified by:
asChunkPoolin interfaceIntChunkPool- Specified by:
asChunkPoolin interfaceLongChunkPool- Specified by:
asChunkPoolin interfaceObjectChunkPool- Specified by:
asChunkPoolin interfaceShortChunkPool- Returns:
- This BooleanChunkPool as a
ChunkPool. This is useful for passing this pool to methods that expect aChunkPoolbut do not need to know the specific type.
-
takeWritableBooleanChunk
Description copied from interface:BooleanChunkPoolTake aWritableBooleanChunkof at least the specifiedcapacity. The result belongs to the caller untilclosed.- Specified by:
takeWritableBooleanChunkin interfaceBooleanChunkPool- Parameters:
capacity- The minimum capacity for the result- Returns:
- A
WritableBooleanChunkof at least the specifiedcapacitythat belongs to the caller untilclosed
-
takeResettableBooleanChunk
Description copied from interface:BooleanChunkPoolTake aResettableBooleanChunk. The result belongs to the caller untilclosed.- Specified by:
takeResettableBooleanChunkin interfaceBooleanChunkPool- Returns:
- A
ResettableBooleanChunkthat belongs to the caller untilclosed
-
takeResettableWritableBooleanChunk
Description copied from interface:BooleanChunkPoolTake aResettableWritableBooleanChunk. The result belongs to the caller untilclosed.- Specified by:
takeResettableWritableBooleanChunkin interfaceBooleanChunkPool- Returns:
- A
ResettableWritableBooleanChunkthat belongs to the caller untilclosed
-
takeWritableCharChunk
Description copied from interface:CharChunkPoolTake aWritableCharChunkof at least the specifiedcapacity. The result belongs to the caller untilclosed.- Specified by:
takeWritableCharChunkin interfaceCharChunkPool- Parameters:
capacity- The minimum capacity for the result- Returns:
- A
WritableCharChunkof at least the specifiedcapacitythat belongs to the caller untilclosed
-
takeResettableCharChunk
Description copied from interface:CharChunkPoolTake aResettableCharChunk. The result belongs to the caller untilclosed.- Specified by:
takeResettableCharChunkin interfaceCharChunkPool- Returns:
- A
ResettableCharChunkthat belongs to the caller untilclosed
-
takeResettableWritableCharChunk
Description copied from interface:CharChunkPoolTake aResettableWritableCharChunk. The result belongs to the caller untilclosed.- Specified by:
takeResettableWritableCharChunkin interfaceCharChunkPool- Returns:
- A
ResettableWritableCharChunkthat belongs to the caller untilclosed
-
takeWritableByteChunk
Description copied from interface:ByteChunkPoolTake aWritableByteChunkof at least the specifiedcapacity. The result belongs to the caller untilclosed.- Specified by:
takeWritableByteChunkin interfaceByteChunkPool- Parameters:
capacity- The minimum capacity for the result- Returns:
- A
WritableByteChunkof at least the specifiedcapacitythat belongs to the caller untilclosed
-
takeResettableByteChunk
Description copied from interface:ByteChunkPoolTake aResettableByteChunk. The result belongs to the caller untilclosed.- Specified by:
takeResettableByteChunkin interfaceByteChunkPool- Returns:
- A
ResettableByteChunkthat belongs to the caller untilclosed
-
takeResettableWritableByteChunk
Description copied from interface:ByteChunkPoolTake aResettableWritableByteChunk. The result belongs to the caller untilclosed.- Specified by:
takeResettableWritableByteChunkin interfaceByteChunkPool- Returns:
- A
ResettableWritableByteChunkthat belongs to the caller untilclosed
-
takeWritableShortChunk
Description copied from interface:ShortChunkPoolTake aWritableShortChunkof at least the specifiedcapacity. The result belongs to the caller untilclosed.- Specified by:
takeWritableShortChunkin interfaceShortChunkPool- Parameters:
capacity- The minimum capacity for the result- Returns:
- A
WritableShortChunkof at least the specifiedcapacitythat belongs to the caller untilclosed
-
takeResettableShortChunk
Description copied from interface:ShortChunkPoolTake aResettableShortChunk. The result belongs to the caller untilclosed.- Specified by:
takeResettableShortChunkin interfaceShortChunkPool- Returns:
- A
ResettableShortChunkthat belongs to the caller untilclosed
-
takeResettableWritableShortChunk
Description copied from interface:ShortChunkPoolTake aResettableWritableShortChunk. The result belongs to the caller untilclosed.- Specified by:
takeResettableWritableShortChunkin interfaceShortChunkPool- Returns:
- A
ResettableWritableShortChunkthat belongs to the caller untilclosed
-
takeWritableIntChunk
Description copied from interface:IntChunkPoolTake aWritableIntChunkof at least the specifiedcapacity. The result belongs to the caller untilclosed.- Specified by:
takeWritableIntChunkin interfaceIntChunkPool- Parameters:
capacity- The minimum capacity for the result- Returns:
- A
WritableIntChunkof at least the specifiedcapacitythat belongs to the caller untilclosed
-
takeResettableIntChunk
Description copied from interface:IntChunkPoolTake aResettableIntChunk. The result belongs to the caller untilclosed.- Specified by:
takeResettableIntChunkin interfaceIntChunkPool- Returns:
- A
ResettableIntChunkthat belongs to the caller untilclosed
-
takeResettableWritableIntChunk
Description copied from interface:IntChunkPoolTake aResettableWritableIntChunk. The result belongs to the caller untilclosed.- Specified by:
takeResettableWritableIntChunkin interfaceIntChunkPool- Returns:
- A
ResettableWritableIntChunkthat belongs to the caller untilclosed
-
takeWritableLongChunk
Description copied from interface:LongChunkPoolTake aWritableLongChunkof at least the specifiedcapacity. The result belongs to the caller untilclosed.- Specified by:
takeWritableLongChunkin interfaceLongChunkPool- Parameters:
capacity- The minimum capacity for the result- Returns:
- A
WritableLongChunkof at least the specifiedcapacitythat belongs to the caller untilclosed
-
takeResettableLongChunk
Description copied from interface:LongChunkPoolTake aResettableLongChunk. The result belongs to the caller untilclosed.- Specified by:
takeResettableLongChunkin interfaceLongChunkPool- Returns:
- A
ResettableLongChunkthat belongs to the caller untilclosed
-
takeResettableWritableLongChunk
Description copied from interface:LongChunkPoolTake aResettableWritableLongChunk. The result belongs to the caller untilclosed.- Specified by:
takeResettableWritableLongChunkin interfaceLongChunkPool- Returns:
- A
ResettableWritableLongChunkthat belongs to the caller untilclosed
-
takeWritableFloatChunk
Description copied from interface:FloatChunkPoolTake aWritableFloatChunkof at least the specifiedcapacity. The result belongs to the caller untilclosed.- Specified by:
takeWritableFloatChunkin interfaceFloatChunkPool- Parameters:
capacity- The minimum capacity for the result- Returns:
- A
WritableFloatChunkof at least the specifiedcapacitythat belongs to the caller untilclosed
-
takeResettableFloatChunk
Description copied from interface:FloatChunkPoolTake aResettableFloatChunk. The result belongs to the caller untilclosed.- Specified by:
takeResettableFloatChunkin interfaceFloatChunkPool- Returns:
- A
ResettableFloatChunkthat belongs to the caller untilclosed
-
takeResettableWritableFloatChunk
Description copied from interface:FloatChunkPoolTake aResettableWritableFloatChunk. The result belongs to the caller untilclosed.- Specified by:
takeResettableWritableFloatChunkin interfaceFloatChunkPool- Returns:
- A
ResettableWritableFloatChunkthat belongs to the caller untilclosed
-
takeWritableDoubleChunk
Description copied from interface:DoubleChunkPoolTake aWritableDoubleChunkof at least the specifiedcapacity. The result belongs to the caller untilclosed.- Specified by:
takeWritableDoubleChunkin interfaceDoubleChunkPool- Parameters:
capacity- The minimum capacity for the result- Returns:
- A
WritableDoubleChunkof at least the specifiedcapacitythat belongs to the caller untilclosed
-
takeResettableDoubleChunk
Description copied from interface:DoubleChunkPoolTake aResettableDoubleChunk. The result belongs to the caller untilclosed.- Specified by:
takeResettableDoubleChunkin interfaceDoubleChunkPool- Returns:
- A
ResettableDoubleChunkthat belongs to the caller untilclosed
-
takeResettableWritableDoubleChunk
Description copied from interface:DoubleChunkPoolTake aResettableWritableDoubleChunk. The result belongs to the caller untilclosed.- Specified by:
takeResettableWritableDoubleChunkin interfaceDoubleChunkPool- Returns:
- A
ResettableWritableDoubleChunkthat belongs to the caller untilclosed
-
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
-