Interface ConstructSnapshot.SnapshotConsistent
- All Known Subinterfaces:
ConstructSnapshot.SnapshotControl
- All Known Implementing Classes:
ConstructSnapshot.StaticSnapshotControl
,OperationSnapshotControl
,OperationSnapshotControlEx
- Enclosing class:
- ConstructSnapshot
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Interface for
snapshotConsistent(long, boolean)
.-
Method Summary
Modifier and TypeMethodDescriptionboolean
snapshotConsistent
(long currentClockValue, boolean usingPreviousValues) Determine (from within a snapshot function) if the snapshot appears to still be consistent.
-
Method Details
-
snapshotConsistent
boolean snapshotConsistent(long currentClockValue, boolean usingPreviousValues) Determine (from within a snapshot function) if the snapshot appears to still be consistent.
This should be no more restrictive than the associated
ConstructSnapshot.SnapshotCompletedConsistently
.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. SeeConstructSnapshot.clockConsistent(long, long, boolean)
.- Parameters:
currentClockValue
- The current clock valueusingPreviousValues
- Whether the snapshot function is using previous values- Returns:
- True if we can no longer expect that the snapshot function's result will be consistent
-