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
ChunkPool
s. 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 void
static MultiChunkPool
getChunkPool
(@NotNull ChunkType chunkType) void
giveResettableBooleanChunk
(@NotNull ResettableBooleanChunk<?> resettableBooleanChunk) void
giveResettableByteChunk
(@NotNull ResettableByteChunk<?> resettableByteChunk) void
giveResettableCharChunk
(@NotNull ResettableCharChunk<?> resettableCharChunk) void
giveResettableDoubleChunk
(@NotNull ResettableDoubleChunk<?> resettableDoubleChunk) void
giveResettableFloatChunk
(@NotNull ResettableFloatChunk<?> resettableFloatChunk) void
giveResettableIntChunk
(@NotNull ResettableIntChunk<?> resettableIntChunk) void
giveResettableLongChunk
(@NotNull ResettableLongChunk<?> resettableLongChunk) void
giveResettableObjectChunk
(@NotNull ResettableObjectChunk<?, ?> resettableObjectChunk) void
giveResettableShortChunk
(@NotNull ResettableShortChunk<?> resettableShortChunk) void
giveResettableWritableBooleanChunk
(@NotNull ResettableWritableBooleanChunk<?> resettableWritableBooleanChunk) void
giveResettableWritableByteChunk
(@NotNull ResettableWritableByteChunk<?> resettableWritableByteChunk) void
giveResettableWritableCharChunk
(@NotNull ResettableWritableCharChunk<?> resettableWritableCharChunk) void
giveResettableWritableDoubleChunk
(@NotNull ResettableWritableDoubleChunk<?> resettableWritableDoubleChunk) void
giveResettableWritableFloatChunk
(@NotNull ResettableWritableFloatChunk<?> resettableWritableFloatChunk) void
giveResettableWritableIntChunk
(@NotNull ResettableWritableIntChunk<?> resettableWritableIntChunk) void
giveResettableWritableLongChunk
(@NotNull ResettableWritableLongChunk<?> resettableWritableLongChunk) void
giveResettableWritableObjectChunk
(@NotNull ResettableWritableObjectChunk<?, ?> resettableWritableObjectChunk) void
giveResettableWritableShortChunk
(@NotNull ResettableWritableShortChunk<?> resettableWritableShortChunk) void
giveWritableBooleanChunk
(@NotNull WritableBooleanChunk<?> writableBooleanChunk) void
giveWritableByteChunk
(@NotNull WritableByteChunk<?> writableByteChunk) void
giveWritableCharChunk
(@NotNull WritableCharChunk<?> writableCharChunk) void
giveWritableDoubleChunk
(@NotNull WritableDoubleChunk<?> writableDoubleChunk) void
giveWritableFloatChunk
(@NotNull WritableFloatChunk<?> writableFloatChunk) void
giveWritableIntChunk
(@NotNull WritableIntChunk<?> writableIntChunk) void
giveWritableLongChunk
(@NotNull WritableLongChunk<?> writableLongChunk) void
giveWritableObjectChunk
(@NotNull WritableObjectChunk<?, ?> writableObjectChunk) void
giveWritableShortChunk
(@NotNull WritableShortChunk<?> writableShortChunk) <ATTR extends Any>
ResettableBooleanChunk<ATTR><ATTR extends Any>
ResettableByteChunk<ATTR><ATTR extends Any>
ResettableCharChunk<ATTR><ATTR extends Any>
ResettableDoubleChunk<ATTR><ATTR extends Any>
ResettableFloatChunk<ATTR><ATTR extends Any>
ResettableIntChunk<ATTR><ATTR extends Any>
ResettableLongChunk<ATTR><TYPE,
ATTR extends Any>
ResettableObjectChunk<TYPE,ATTR> <ATTR extends Any>
ResettableShortChunk<ATTR><ATTR extends Any>
ResettableWritableBooleanChunk<ATTR><ATTR extends Any>
ResettableWritableByteChunk<ATTR><ATTR extends Any>
ResettableWritableCharChunk<ATTR><ATTR extends Any>
ResettableWritableDoubleChunk<ATTR><ATTR extends Any>
ResettableWritableFloatChunk<ATTR><ATTR extends Any>
ResettableWritableIntChunk<ATTR><ATTR extends Any>
ResettableWritableLongChunk<ATTR><TYPE,
ATTR extends Any>
ResettableWritableObjectChunk<TYPE,ATTR> <ATTR extends Any>
ResettableWritableShortChunk<ATTR><ATTR extends Any>
WritableBooleanChunk<ATTR>takeWritableBooleanChunk
(int capacity) <ATTR extends Any>
WritableByteChunk<ATTR>takeWritableByteChunk
(int capacity) <ATTR extends Any>
WritableCharChunk<ATTR>takeWritableCharChunk
(int capacity) <ATTR extends Any>
WritableDoubleChunk<ATTR>takeWritableDoubleChunk
(int capacity) <ATTR extends Any>
WritableFloatChunk<ATTR>takeWritableFloatChunk
(int capacity) <ATTR extends Any>
WritableIntChunk<ATTR>takeWritableIntChunk
(int capacity) <ATTR extends Any>
WritableLongChunk<ATTR>takeWritableLongChunk
(int capacity) <TYPE,
ATTR extends Any>
WritableObjectChunk<TYPE,ATTR> takeWritableObjectChunk
(int capacity) <ATTR extends Any>
WritableShortChunk<ATTR>takeWritableShortChunk
(int capacity)
-
Method Details
-
enableDedicatedPoolForThisThread
public static void enableDedicatedPoolForThisThread() -
forThisThread
-
getChunkPool
-
getBooleanChunkPool
-
getCharChunkPool
-
getByteChunkPool
-
getShortChunkPool
-
getIntChunkPool
-
getLongChunkPool
-
getFloatChunkPool
-
getDoubleChunkPool
-
getObjectChunkPool
-
asChunkPool
- Specified by:
asChunkPool
in interfaceBooleanChunkPool
- Specified by:
asChunkPool
in interfaceByteChunkPool
- Specified by:
asChunkPool
in interfaceCharChunkPool
- Specified by:
asChunkPool
in interfaceDoubleChunkPool
- Specified by:
asChunkPool
in interfaceFloatChunkPool
- Specified by:
asChunkPool
in interfaceIntChunkPool
- Specified by:
asChunkPool
in interfaceLongChunkPool
- Specified by:
asChunkPool
in interfaceObjectChunkPool
- Specified by:
asChunkPool
in interfaceShortChunkPool
-
takeWritableBooleanChunk
- Specified by:
takeWritableBooleanChunk
in interfaceBooleanChunkPool
-
giveWritableBooleanChunk
public void giveWritableBooleanChunk(@NotNull @NotNull WritableBooleanChunk<?> writableBooleanChunk) - Specified by:
giveWritableBooleanChunk
in interfaceBooleanChunkPool
-
takeResettableBooleanChunk
- Specified by:
takeResettableBooleanChunk
in interfaceBooleanChunkPool
-
giveResettableBooleanChunk
public void giveResettableBooleanChunk(@NotNull @NotNull ResettableBooleanChunk<?> resettableBooleanChunk) - Specified by:
giveResettableBooleanChunk
in interfaceBooleanChunkPool
-
takeResettableWritableBooleanChunk
- Specified by:
takeResettableWritableBooleanChunk
in interfaceBooleanChunkPool
-
giveResettableWritableBooleanChunk
public void giveResettableWritableBooleanChunk(@NotNull @NotNull ResettableWritableBooleanChunk<?> resettableWritableBooleanChunk) - Specified by:
giveResettableWritableBooleanChunk
in interfaceBooleanChunkPool
-
takeWritableCharChunk
- Specified by:
takeWritableCharChunk
in interfaceCharChunkPool
-
giveWritableCharChunk
- Specified by:
giveWritableCharChunk
in interfaceCharChunkPool
-
takeResettableCharChunk
- Specified by:
takeResettableCharChunk
in interfaceCharChunkPool
-
giveResettableCharChunk
- Specified by:
giveResettableCharChunk
in interfaceCharChunkPool
-
takeResettableWritableCharChunk
- Specified by:
takeResettableWritableCharChunk
in interfaceCharChunkPool
-
giveResettableWritableCharChunk
public void giveResettableWritableCharChunk(@NotNull @NotNull ResettableWritableCharChunk<?> resettableWritableCharChunk) - Specified by:
giveResettableWritableCharChunk
in interfaceCharChunkPool
-
takeWritableByteChunk
- Specified by:
takeWritableByteChunk
in interfaceByteChunkPool
-
giveWritableByteChunk
- Specified by:
giveWritableByteChunk
in interfaceByteChunkPool
-
takeResettableByteChunk
- Specified by:
takeResettableByteChunk
in interfaceByteChunkPool
-
giveResettableByteChunk
- Specified by:
giveResettableByteChunk
in interfaceByteChunkPool
-
takeResettableWritableByteChunk
- Specified by:
takeResettableWritableByteChunk
in interfaceByteChunkPool
-
giveResettableWritableByteChunk
public void giveResettableWritableByteChunk(@NotNull @NotNull ResettableWritableByteChunk<?> resettableWritableByteChunk) - Specified by:
giveResettableWritableByteChunk
in interfaceByteChunkPool
-
takeWritableShortChunk
- Specified by:
takeWritableShortChunk
in interfaceShortChunkPool
-
giveWritableShortChunk
- Specified by:
giveWritableShortChunk
in interfaceShortChunkPool
-
takeResettableShortChunk
- Specified by:
takeResettableShortChunk
in interfaceShortChunkPool
-
giveResettableShortChunk
public void giveResettableShortChunk(@NotNull @NotNull ResettableShortChunk<?> resettableShortChunk) - Specified by:
giveResettableShortChunk
in interfaceShortChunkPool
-
takeResettableWritableShortChunk
- Specified by:
takeResettableWritableShortChunk
in interfaceShortChunkPool
-
giveResettableWritableShortChunk
public void giveResettableWritableShortChunk(@NotNull @NotNull ResettableWritableShortChunk<?> resettableWritableShortChunk) - Specified by:
giveResettableWritableShortChunk
in interfaceShortChunkPool
-
takeWritableIntChunk
- Specified by:
takeWritableIntChunk
in interfaceIntChunkPool
-
giveWritableIntChunk
- Specified by:
giveWritableIntChunk
in interfaceIntChunkPool
-
takeResettableIntChunk
- Specified by:
takeResettableIntChunk
in interfaceIntChunkPool
-
giveResettableIntChunk
- Specified by:
giveResettableIntChunk
in interfaceIntChunkPool
-
takeResettableWritableIntChunk
- Specified by:
takeResettableWritableIntChunk
in interfaceIntChunkPool
-
giveResettableWritableIntChunk
public void giveResettableWritableIntChunk(@NotNull @NotNull ResettableWritableIntChunk<?> resettableWritableIntChunk) - Specified by:
giveResettableWritableIntChunk
in interfaceIntChunkPool
-
takeWritableLongChunk
- Specified by:
takeWritableLongChunk
in interfaceLongChunkPool
-
giveWritableLongChunk
- Specified by:
giveWritableLongChunk
in interfaceLongChunkPool
-
takeResettableLongChunk
- Specified by:
takeResettableLongChunk
in interfaceLongChunkPool
-
giveResettableLongChunk
- Specified by:
giveResettableLongChunk
in interfaceLongChunkPool
-
takeResettableWritableLongChunk
- Specified by:
takeResettableWritableLongChunk
in interfaceLongChunkPool
-
giveResettableWritableLongChunk
public void giveResettableWritableLongChunk(@NotNull @NotNull ResettableWritableLongChunk<?> resettableWritableLongChunk) - Specified by:
giveResettableWritableLongChunk
in interfaceLongChunkPool
-
takeWritableFloatChunk
- Specified by:
takeWritableFloatChunk
in interfaceFloatChunkPool
-
giveWritableFloatChunk
- Specified by:
giveWritableFloatChunk
in interfaceFloatChunkPool
-
takeResettableFloatChunk
- Specified by:
takeResettableFloatChunk
in interfaceFloatChunkPool
-
giveResettableFloatChunk
public void giveResettableFloatChunk(@NotNull @NotNull ResettableFloatChunk<?> resettableFloatChunk) - Specified by:
giveResettableFloatChunk
in interfaceFloatChunkPool
-
takeResettableWritableFloatChunk
- Specified by:
takeResettableWritableFloatChunk
in interfaceFloatChunkPool
-
giveResettableWritableFloatChunk
public void giveResettableWritableFloatChunk(@NotNull @NotNull ResettableWritableFloatChunk<?> resettableWritableFloatChunk) - Specified by:
giveResettableWritableFloatChunk
in interfaceFloatChunkPool
-
takeWritableDoubleChunk
- Specified by:
takeWritableDoubleChunk
in interfaceDoubleChunkPool
-
giveWritableDoubleChunk
- Specified by:
giveWritableDoubleChunk
in interfaceDoubleChunkPool
-
takeResettableDoubleChunk
- Specified by:
takeResettableDoubleChunk
in interfaceDoubleChunkPool
-
giveResettableDoubleChunk
public void giveResettableDoubleChunk(@NotNull @NotNull ResettableDoubleChunk<?> resettableDoubleChunk) - Specified by:
giveResettableDoubleChunk
in interfaceDoubleChunkPool
-
takeResettableWritableDoubleChunk
- Specified by:
takeResettableWritableDoubleChunk
in interfaceDoubleChunkPool
-
giveResettableWritableDoubleChunk
public void giveResettableWritableDoubleChunk(@NotNull @NotNull ResettableWritableDoubleChunk<?> resettableWritableDoubleChunk) - Specified by:
giveResettableWritableDoubleChunk
in interfaceDoubleChunkPool
-
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
-