Class ConstructSnapshot.StaticSnapshotControl

java.lang.Object
io.deephaven.engine.table.impl.remote.ConstructSnapshot.StaticSnapshotControl
All Implemented Interfaces:
ConstructSnapshot.SnapshotCompletedConsistently, ConstructSnapshot.SnapshotConsistent, ConstructSnapshot.SnapshotControl, ConstructSnapshot.UsePreviousValues
Enclosing class:
ConstructSnapshot

public static final class ConstructSnapshot.StaticSnapshotControl extends Object implements ConstructSnapshot.SnapshotControl
An implementation of ConstructSnapshot.SnapshotControl for sources that cannot update.
  • Field Details

  • Method Details

    • usePreviousValues

      public Boolean usePreviousValues(long beforeClockValue)
      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 interface ConstructSnapshot.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 used
      • false if they should not
      • null if a clock discrepancy was detected and we must retry with a new beforeClockValue
    • 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. See ConstructSnapshot.clockConsistent(long, long, boolean).

      Specified by:
      snapshotConsistent in interface ConstructSnapshot.SnapshotConsistent
      Parameters:
      currentClockValue - The current clock value
      usingPreviousValues - 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

      public UpdateGraph getUpdateGraph()
      Specified by:
      getUpdateGraph in interface ConstructSnapshot.SnapshotControl
      Returns:
      The UpdateGraph that applies for this snapshot; null for snapshots of static data, which can skip all consistency-related considerations