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
Modifier and TypeInterfaceDescriptionstatic enum
The state component of a logical timestamp. -
Field Summary
Modifier and TypeFieldDescriptionstatic final long
The "null" value, which encodes {step=-1, state=Idle}.static final long
static final long
-
Method Summary
Modifier and TypeMethodDescriptiondefault LogicalClock.State
Get the current clock state.default long
Get the current Step of the clock.long
Get the current value of the clock.static LogicalClock.State
getState
(long value) Get theLogicalClock.State
of the LogicalClock for a particular clock value.static long
getStep
(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
-end
cycle.- Parameters:
value
- The clock value to get the step for- Returns:
- The clock step associated with value
-
getState
Get theLogicalClock.State
of 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:
-