Class ConstructSnapshot.StaticSnapshotControl
- All Implemented Interfaces:
ConstructSnapshot.SnapshotCompletedConsistently
,ConstructSnapshot.SnapshotConsistent
,ConstructSnapshot.SnapshotControl
,ConstructSnapshot.UsePreviousValues
- Enclosing class:
- ConstructSnapshot
ConstructSnapshot.SnapshotControl
for sources that cannot update.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
snapshotConsistent
(long currentClockValue, boolean usingPreviousValues) Determine (from within a snapshot function) if the snapshot appears to still be consistent.usePreviousValues
(long beforeClockValue) Determine if previous values should be used in table data access for the givenclock
value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.deephaven.engine.table.impl.remote.ConstructSnapshot.SnapshotControl
snapshotCompletedConsistently
-
Field Details
-
INSTANCE
-
-
Method Details
-
usePreviousValues
Description copied from interface:ConstructSnapshot.UsePreviousValues
Determine if previous values should be used in table data access for the given
clock
value.Expected to never request previous values during the idle phase of a cycle.
Must never request previous values for a source that has already been updated on the current cycle, unless it can be proven that that source was not instantiated on the current cycle.
Must be safe to call more than once, exactly once per snapshot attempt.
- Specified by:
usePreviousValues
in interfaceConstructSnapshot.UsePreviousValues
- Parameters:
beforeClockValue
- The current clock value before the snapshot function will be invoked- Returns:
- A
Boolean
with the following meaning:true
if previous values should be usedfalse
if they should notnull
if a clock discrepancy was detected and we must retry with a newbeforeClockValue
-
snapshotConsistent
public boolean snapshotConsistent(long currentClockValue, boolean usingPreviousValues) Description copied from interface:ConstructSnapshot.SnapshotConsistent
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)
.- Specified by:
snapshotConsistent
in interfaceConstructSnapshot.SnapshotConsistent
- 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
-
getUpdateGraph
- Specified by:
getUpdateGraph
in interfaceConstructSnapshot.SnapshotControl
- Returns:
- The
UpdateGraph
that applies for this snapshot;null
for snapshots of static data, which can skip all consistency-related considerations
-