Class OperationSnapshotControlEx

java.lang.Object
io.deephaven.engine.table.impl.OperationSnapshotControl
io.deephaven.engine.table.impl.OperationSnapshotControlEx
All Implemented Interfaces:
ConstructSnapshot.SnapshotCompletedConsistently, ConstructSnapshot.SnapshotConsistent, ConstructSnapshot.SnapshotControl, ConstructSnapshot.UsePreviousValues

public final class OperationSnapshotControlEx extends OperationSnapshotControl
Variant of OperationSnapshotControl that considers "extra" dependencies in addition to the source BaseTable when determining whether to use previous values during initialization or evaluating success. This is useful anytime an operation needs to listen to and snapshot one data source while also snapshotting others.

The decision is made over the source and every extra together. Previous values are used only when none of them has been satisfied on the step. If some are satisfied and others are not, the control waits for the rest and then uses current values; once all are satisfied it uses current values without waiting. A static source cannot be unsatisfied, so it does not count.

For the consistency check afterwards, extras are treated as notification oblivious by default: their notifications do not invalidate a snapshot, because their previous values remain stable for the whole cycle and a snapshot using previous values reads them consistently no matter when they tick. That is the correct treatment for the usual extras, which are tables or table-backed structures such as data index tables.

An extra that also implements NotificationAwareDependency is the exception: it keeps no previous version of the state it guards, so a snapshot that used previous values while that extra changed its state on the same step must be retried. Such extras are detected automatically from those passed to the constructor, so callers need do nothing beyond passing them as dependencies.

On an update-processing thread a snapshot never uses previous values and cannot wait, so any unsatisfied dependency is an IllegalStateException: the operation must be ordered after that dependency by the caller.