Package io.deephaven.engine.updategraph
Interface LogicalClock
- All Known Implementing Classes:
LogicalClockImpl
public interface LogicalClock
A logical update clock interface that has two states, Updating and Idle.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe state component of a logical timestamp. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longThe "null" value, which encodes {step=-1, state=Idle}.static final longstatic final long -
Method Summary
Modifier and TypeMethodDescriptiondefault LogicalClock.StateGet the current clock state.default longGet the current Step of the clock.longGet the current value of the clock.static LogicalClock.StategetState(long value) Get theLogicalClock.Stateof the LogicalClock for a particular clock value.static longgetStep(long value) Get the clock step for the input clock value.
-
Field Details
-
NULL_CLOCK_VALUE
static final long NULL_CLOCK_VALUEThe "null" value, which encodes {step=-1, state=Idle}. Used as a marker when no clock value is appropriate, e.g. for snapshots of static data.- See Also:
-
STEP_SHIFT
static final long STEP_SHIFT- See Also:
-
STATE_MASK
static final long STATE_MASK- See Also:
-
-
Method Details
-
getStep
static long getStep(long value) Get the clock step for the input clock value. The step increments one time for each completestart-endcycle.- Parameters:
value- The clock value to get the step for- Returns:
- The clock step associated with value
-
getState
Get theLogicalClock.Stateof the LogicalClock for a particular clock value.- Parameters:
value- The clock value- Returns:
- The clock state associated with the input value
-
currentValue
long currentValue()Get the current value of the clock. -
currentStep
Get the current Step of the clock.- See Also:
-
currentState
Get the current clock state.- See Also:
-