Package io.deephaven.chunk.util.pools
Class ChunkPoolInstrumentation
java.lang.Object
io.deephaven.chunk.util.pools.ChunkPoolInstrumentation
Static callback holder for pooled chunk allocation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <RETURN_TYPE>
RETURN_TYPEgetAndRecord(@NotNull Supplier<RETURN_TYPE> allocationProcedure) Return the result ofallocationProcedure, run by the currently installedallocationRecorder.static voidsetAllocationRecorder(@Nullable Function<Supplier<?>, ?> allocationRecorder) Set an allocation recorder for this process'chunk pools.
-
Constructor Details
-
ChunkPoolInstrumentation
public ChunkPoolInstrumentation()
-
-
Method Details
-
setAllocationRecorder
public static void setAllocationRecorder(@Nullable @Nullable Function<Supplier<?>, ?> allocationRecorder) Set an allocation recorder for this process'chunk pools.- Parameters:
allocationRecorder- The new allocation recorder, ornullto install a default no-op recorder
-
getAndRecord
public static <RETURN_TYPE> RETURN_TYPE getAndRecord(@NotNull @NotNull Supplier<RETURN_TYPE> allocationProcedure) Return the result ofallocationProcedure, run by the currently installedallocationRecorder.- Parameters:
allocationProcedure- The allocation procedure toSupplier.get()- Returns:
- The result of
allocationProcedure
-