Interface ConstructSnapshot.State
- Enclosing class:
- ConstructSnapshot
public static interface ConstructSnapshot.State
-
Method Summary
Modifier and TypeMethodDescriptionappendConcurrentAttemptClockInfo
(@NotNull LogOutput logOutput) Append clock info that pertains to the concurrent attempt state tologOutput
.boolean
Test that determines whether the currently active concurrent snapshot attempt has become inconsistent.void
Check that fails if the currently active concurrent snapshot attempt has become inconsistent.long
Return the currently active concurrent snapshot attempt's "before" clock value, or zero if there is no concurrent attempt active.void
maybeWaitForSatisfaction
(NotificationQueue.Dependency dependency) Wait for a dependency to become satisfied on the current cycle if we're trying to use current values for the currently active concurrent snapshot attempt.
-
Method Details
-
concurrentAttemptInconsistent
boolean concurrentAttemptInconsistent()Test that determines whether the currently active concurrent snapshot attempt has become inconsistent. Always returnsfalse
if there is no snapshot attempt active, or if there is a locked attempt active (necessarily at lower depth than the lowest concurrent attempt).- Returns:
- Whether the clock or sources have changed in such a way as to make the currently active concurrent snapshot attempt inconsistent
-
failIfConcurrentAttemptInconsistent
void failIfConcurrentAttemptInconsistent()Check that fails if the currently active concurrent snapshot attempt has become inconsistent. This is a no-op if there is no snapshot attempt active, or if there is a locked attempt active (necessarily at lower depth than the lowest concurrent attempt).- Throws:
ConstructSnapshot.SnapshotInconsistentException
- If the currently active concurrent snapshot attempt has become inconsistent
-
maybeWaitForSatisfaction
Wait for a dependency to become satisfied on the current cycle if we're trying to use current values for the currently active concurrent snapshot attempt. This is a no-op if there is no snapshot attempt active, or if there is a locked attempt active (necessarily at lower depth than the lowest concurrent attempt).- Parameters:
dependency
- The dependency, which may be null to avoid redundant checks in calling code- Throws:
ConstructSnapshot.SnapshotInconsistentException
- If we cannot wait for this dependency on the current step because the step changed
-
getConcurrentAttemptClockValue
long getConcurrentAttemptClockValue()Return the currently active concurrent snapshot attempt's "before" clock value, or zero if there is no concurrent attempt active.- Returns:
- The concurrent snapshot attempt's "before" clock value, or zero
-
appendConcurrentAttemptClockInfo
Append clock info that pertains to the concurrent attempt state tologOutput
.- Parameters:
logOutput
- TheLogOutput
- Returns:
logOutput
-