Package io.deephaven.engine.table.impl
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
Variant of
OperationSnapshotControl that considers an "extra" NotificationStepSource 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
another.-
Constructor Summary
ConstructorsConstructorDescriptionOperationSnapshotControlEx(@NotNull BaseTable<?> sourceTable, @NotNull NotificationStepSource extra) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanvoidsetListenerAndResult(TableUpdateListener listener, @NotNull NotificationStepReceiver resultTable) Set the listener that will eventually become the listener, if we have a successful snapshot.booleansnapshotCompletedConsistently(long afterClockValue, boolean usedPreviousValues) Ends a snapshot.usePreviousValues(long beforeClockValue) Starts a snapshot.Methods inherited from class io.deephaven.engine.table.impl.OperationSnapshotControl
getUpdateGraph, snapshotConsistent
-
Constructor Details
-
OperationSnapshotControlEx
public OperationSnapshotControlEx(@NotNull @NotNull BaseTable<?> sourceTable, @NotNull @NotNull NotificationStepSource extra)
-
-
Method Details
-
usePreviousValues
Description copied from class:OperationSnapshotControlStarts a snapshot.- Specified by:
usePreviousValuesin interfaceConstructSnapshot.UsePreviousValues- Overrides:
usePreviousValuesin classOperationSnapshotControl- Parameters:
beforeClockValue- the logical clock value we are starting a snapshot on- Returns:
- true if we should use previous values, false if we should use current values.
-
snapshotCompletedConsistently
public boolean snapshotCompletedConsistently(long afterClockValue, boolean usedPreviousValues) Description copied from class:OperationSnapshotControlEnds a snapshot. Overriding methods must callsuperin order to ensure that the result's last notification step is properly set.- Specified by:
snapshotCompletedConsistentlyin interfaceConstructSnapshot.SnapshotCompletedConsistently- Specified by:
snapshotCompletedConsistentlyin interfaceConstructSnapshot.SnapshotControl- Overrides:
snapshotCompletedConsistentlyin classOperationSnapshotControl- Parameters:
afterClockValue- Thelogical clockcycle we are ending a snapshot onusedPreviousValues- Whether we used previous values during the snapshot- Returns:
- true if the snapshot was successful, false if we should try again.
-
setListenerAndResult
public void setListenerAndResult(TableUpdateListener listener, @NotNull @NotNull NotificationStepReceiver resultTable) Description copied from class:OperationSnapshotControlSet the listener that will eventually become the listener, if we have a successful snapshot.- Overrides:
setListenerAndResultin classOperationSnapshotControl- Parameters:
listener- The listener that we will eventually forward all updates toresultTable- The table that will result from this operation
-
isInInitialNotificationWindow
protected boolean isInInitialNotificationWindow()- Overrides:
isInInitialNotificationWindowin classOperationSnapshotControl- Returns:
- Whether we are in the initial notification window and can continue with the snapshot
-