Class ChunkPoolInstrumentation

java.lang.Object
io.deephaven.chunk.util.pools.ChunkPoolInstrumentation

public class ChunkPoolInstrumentation extends Object
Static callback holder for pooled chunk allocation.
  • 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, or null to install a default no-op recorder
    • getAndRecord

      public static <RETURN_TYPE> RETURN_TYPE getAndRecord(@NotNull @NotNull Supplier<RETURN_TYPE> allocationProcedure)
      Return the result of allocationProcedure, run by the currently installed allocationRecorder.
      Parameters:
      allocationProcedure - The allocation procedure to Supplier.get()
      Returns:
      The result of allocationProcedure