Package io.deephaven.engine.updategraph
Class UpdateGraphLock
java.lang.Object
io.deephaven.engine.updategraph.UpdateGraphLock
Lock class to support
UpdateGraph
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Instrumentation interface for recording lock events. -
Field Summary
Modifier and TypeFieldDescriptionprotected final UpdateGraph
TheUpdateGraph
used for instrumentation and assertions. -
Method Summary
Modifier and TypeMethodDescriptionstatic UpdateGraphLock
create
(@NotNull UpdateGraph updateGraph, boolean allowUnitTestMode) Construct a lock for a newUpdateGraph
instance.abstract AwareFunctionalLock
Get the exclusive lock (similar toReadWriteLock.writeLock()
()}, but with UGP-specific instrumentation).static void
installInstrumentation
(@Nullable UpdateGraphLock.Instrumentation instrumentation) Install aninstrumentation recorder
for all UpdateGraphLock instances.abstract void
reset()
Reset this UpdateGraphLock between unit tests to ensure a clean slate.abstract AwareFunctionalLock
Get the shared lock (similar toReadWriteLock.readLock()
, but with UGP-specific instrumentation).
-
Field Details
-
updateGraph
TheUpdateGraph
used for instrumentation and assertions.
-
-
Method Details
-
installInstrumentation
public static void installInstrumentation(@Nullable @Nullable UpdateGraphLock.Instrumentation instrumentation) Install aninstrumentation recorder
for all UpdateGraphLock instances.- Parameters:
instrumentation
- Theinstrumentation recorder
, ornull
to install a no-op recorder.
-
create
public static UpdateGraphLock create(@NotNull @NotNull UpdateGraph updateGraph, boolean allowUnitTestMode) Construct a lock for a newUpdateGraph
instance.- Parameters:
updateGraph
- TheUpdateGraph
instance 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.
-