Package io.deephaven.engine.updategraph
Class UpdateGraphLock
java.lang.Object
io.deephaven.engine.updategraph.UpdateGraphLock
Lock class to support
UpdateGraph.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceInstrumentation interface for recording lock events. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final UpdateGraphTheUpdateGraphused for instrumentation and assertions. -
Method Summary
Modifier and TypeMethodDescriptionstatic UpdateGraphLockcreate(@NotNull UpdateGraph updateGraph, boolean allowUnitTestMode) Construct a lock for a newUpdateGraphinstance.abstract AwareFunctionalLockGet the exclusive lock (similar toReadWriteLock.writeLock()()}, but with UGP-specific instrumentation).static voidinstallInstrumentation(@Nullable UpdateGraphLock.Instrumentation instrumentation) Install aninstrumentation recorderfor all UpdateGraphLock instances.abstract voidreset()Reset this UpdateGraphLock between unit tests to ensure a clean slate.abstract AwareFunctionalLockGet the shared lock (similar toReadWriteLock.readLock(), but with UGP-specific instrumentation).
-
Field Details
-
updateGraph
TheUpdateGraphused for instrumentation and assertions.
-
-
Method Details
-
installInstrumentation
public static void installInstrumentation(@Nullable @Nullable UpdateGraphLock.Instrumentation instrumentation) Install aninstrumentation recorderfor all UpdateGraphLock instances.- Parameters:
instrumentation- Theinstrumentation recorder, ornullto install a no-op recorder.
-
create
public static UpdateGraphLock create(@NotNull @NotNull UpdateGraph updateGraph, boolean allowUnitTestMode) Construct a lock for a newUpdateGraphinstance.- Parameters:
updateGraph- TheUpdateGraphinstance to useallowUnitTestMode- Whether this lock instance is to be used for unit tests only
-
exclusiveLock
Get the exclusive lock (similar toReadWriteLock.writeLock()()}, but with UGP-specific instrumentation). SeeUpdateGraph.exclusiveLock()for user-facing documentation.- Returns:
- The exclusive lock
-
reset
Reset this UpdateGraphLock between unit tests to ensure a clean slate.
-