Class SystemicObjectTracker

java.lang.Object
io.deephaven.engine.util.systemicmarking.SystemicObjectTracker

public class SystemicObjectTracker extends Object
If enabled, marks objects as systemically important. When enabled, only errors from systemically important objects are treated as fatal.
  • Constructor Details

    • SystemicObjectTracker

      public SystemicObjectTracker()
  • Method Details

    • isSystemicObjectMarkingEnabled

      public static boolean isSystemicObjectMarkingEnabled()
      Returns:
      true if systemic object marking is enabled, false otherwise.
    • isSystemicThread

      public static boolean isSystemicThread()
      Returns:
      true if the current thread is creating systemic objects, false otherwise
    • markThreadSystemic

      public static void markThreadSystemic()
      Marks the current thread as systemically important, this is a permanent change.
    • executeSystemically

      public static <T> T executeSystemically(boolean systemicThread, Supplier<T> supplier)
      Execute the supplier with the thread's systemic importance set to the value of systemicThread.
      Type Parameters:
      T - return type of the supplier
      Parameters:
      systemicThread - if the thread should be systemic while executing supplier
      supplier - the operation to execute with the given value of systemicThread
      Returns:
      the supplier's return value
    • isSystemic

      public static boolean isSystemic(SystemicObject o)
      Determine if an object is systemic. If marking is not enabled, all objects are systemic. If marking is enabled, only objects marked systemic are systemic.
      Returns:
      true if o should be treated as systemic object.