Class Liveness

java.lang.Object
io.deephaven.engine.liveness.Liveness

public final class Liveness extends Object
Utility class for liveness-related instrumentation.
  • Field Details

    • log

      public static final Logger log
    • DEBUG_MODE_ENABLED

      public static final boolean DEBUG_MODE_ENABLED
  • Method Details

    • scheduleCountReport

      public static ScheduledFuture<?> scheduleCountReport(@NotNull @NotNull ScheduledExecutorService scheduler)
      Schedule a job to log the count of known outstanding LivenessReferents.
      Parameters:
      scheduler - The ScheduledExecutorService to use
      Returns:
      The ScheduledFuture for the scheduled job
    • verifyCachedObjectForReuse

      public static boolean verifyCachedObjectForReuse(Object object)

      Determine whether a cached object should be reused, w.r.t. liveness. Null inputs are never safe for reuse. If the object is a LivenessReferent and not a non-refreshing DynamicNode, this method will return the result of trying to manage object with the top of the current thread's LivenessScopeStack.

      Parameters:
      object - The object
      Returns:
      True if the object did not need management, or if it was successfully managed, false otherwise