Interface ConstructSnapshot.SnapshotControl

All Superinterfaces:
ConstructSnapshot.SnapshotCompletedConsistently, ConstructSnapshot.SnapshotConsistent, ConstructSnapshot.UsePreviousValues
All Known Implementing Classes:
ConstructSnapshot.StaticSnapshotControl, OperationSnapshotControl, OperationSnapshotControlEx
Enclosing class:
ConstructSnapshot

Interface used to control snapshot behavior, including previous value usage and consistency testing.
  • Method Details

    • snapshotCompletedConsistently

      default boolean snapshotCompletedConsistently(long afterClockValue, boolean usedPreviousValues)
      Description copied from interface: ConstructSnapshot.SnapshotCompletedConsistently

      Determine if a snapshot was consistent according to the clock cycle. Intended to be paired with a ConstructSnapshot.UsePreviousValues function.

      Can assume as a precondition that the clock step has not been observed to change since the last time the associated ConstructSnapshot.UsePreviousValues.usePreviousValues(long) was invoked, and that the clock state has not been observed to change if previous values were used. See ConstructSnapshot.clockConsistent(long, long, boolean).

      Will be called at most once per snapshot attempt. Will be called for all possibly-successful snapshot attempts. May be called after unsuccessful concurrent snapshot attempts.

      Specified by:
      snapshotCompletedConsistently in interface ConstructSnapshot.SnapshotCompletedConsistently
      Parameters:
      afterClockValue - The current clock value after the snapshot function was invoked
      usedPreviousValues - If previous values were used
      Returns:
      Whether the snapshot is provably consistent
    • getUpdateGraph

      UpdateGraph getUpdateGraph()
      Returns:
      The UpdateGraph that applies for this snapshot; null for snapshots of static data, which can skip all consistency-related considerations