Class SystemicObjectTracker
java.lang.Object
io.deephaven.engine.util.systemicmarking.SystemicObjectTracker
If enabled, marks objects as systemically important.
When enabled, only errors from systemically important objects are treated as fatal.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
executeSystemically
(boolean systemicThread, Supplier<T> supplier) Execute the supplier with the thread's systemic importance set to the value of systemicThread.static boolean
Determine if an object is systemic.static boolean
static boolean
static void
Marks the current thread as systemically important, this is a permanent change.
-
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
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 suppliersupplier
- the operation to execute with the given value of systemicThread- Returns:
- the supplier's return value
-
isSystemic
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.
-