Package com.illumon.iris.db.v2.remote
Interface ConstructSnapshot.SnapshotControl
- All Superinterfaces:
ConstructSnapshot.SnapshotCompletedConsistently
,ConstructSnapshot.SnapshotConsistent
,ConstructSnapshot.UsePreviousValues
- All Known Implementing Classes:
ConstructSnapshot.StaticSnapshotControl
- Enclosing class:
- ConstructSnapshot
public static interface ConstructSnapshot.SnapshotControl extends ConstructSnapshot.UsePreviousValues, ConstructSnapshot.SnapshotConsistent, ConstructSnapshot.SnapshotCompletedConsistently
Interface used to control snapshot behavior, including previous value usage and consistency testing.
-
Method Summary
Modifier and Type Method Description default boolean
snapshotCompletedConsistently(long afterClockValue, boolean usedPreviousValues)
Determine if a snapshot was consistent according to the clock cycle.Methods inherited from interface com.illumon.iris.db.v2.remote.ConstructSnapshot.SnapshotConsistent
snapshotConsistent
Methods inherited from interface com.illumon.iris.db.v2.remote.ConstructSnapshot.UsePreviousValues
usePreviousValues
-
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. SeeConstructSnapshot.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 interfaceConstructSnapshot.SnapshotCompletedConsistently
- Parameters:
afterClockValue
- The current clock value after the snapshot function was invokedusedPreviousValues
- If previous values were used- Returns:
- Whether the snapshot is provably consistent
-