Interface ConstructSnapshot.State

Enclosing class:
ConstructSnapshot

public static interface ConstructSnapshot.State
  • Method Details

    • concurrentAttemptInconsistent

      boolean concurrentAttemptInconsistent()
      Test that determines whether the currently-active concurrent snapshot attempt has become inconsistent. Always returns false 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. source. 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

      void maybeWaitForSatisfaction(@Nullable 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. 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 in order 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

      LogOutput appendConcurrentAttemptClockInfo(@NotNull @NotNull LogOutput logOutput)
      Append clock info that pertains to the concurrent attempt state to logOutput.
      Parameters:
      logOutput - The LogOutput
      Returns:
      logOutput