Class DbTimerInstanceState
java.lang.Object
io.camunda.zeebe.engine.state.instance.DbTimerInstanceState
- All Implemented Interfaces:
TimerInstanceState
,MutableTimerInstanceState
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.camunda.zeebe.engine.state.immutable.TimerInstanceState
TimerInstanceState.TimerVisitor
-
Constructor Summary
ConstructorDescriptionDbTimerInstanceState
(ZeebeDb<ZbColumnFamilies> zeebeDb, TransactionContext transactionContext) -
Method Summary
Modifier and TypeMethodDescriptionvoid
forEachTimerForElementInstance
(long elementInstanceKey, Consumer<TimerInstance> action) NOTE: the timer instance given to the consumer is shared and will be mutated on the next iteration.get
(long elementInstanceKey, long timerKey) long
processTimersWithDueDateBefore
(long timestamp, TimerInstanceState.TimerVisitor consumer) Finds timers with due date beforetimestamp
, and presents them to theconsumer
void
remove
(TimerInstance timer) void
store
(TimerInstance timer)
-
Constructor Details
-
DbTimerInstanceState
public DbTimerInstanceState(ZeebeDb<ZbColumnFamilies> zeebeDb, TransactionContext transactionContext)
-
-
Method Details
-
store
- Specified by:
store
in interfaceMutableTimerInstanceState
-
remove
- Specified by:
remove
in interfaceMutableTimerInstanceState
-
processTimersWithDueDateBefore
public long processTimersWithDueDateBefore(long timestamp, TimerInstanceState.TimerVisitor consumer) Description copied from interface:TimerInstanceState
Finds timers with due date beforetimestamp
, and presents them to theconsumer
- Specified by:
processTimersWithDueDateBefore
in interfaceTimerInstanceState
- Returns:
- due date of the next scheduled timer (or
-1
if no succeeding timer exists)
-
forEachTimerForElementInstance
Description copied from interface:TimerInstanceState
NOTE: the timer instance given to the consumer is shared and will be mutated on the next iteration.- Specified by:
forEachTimerForElementInstance
in interfaceTimerInstanceState
-
get
- Specified by:
get
in interfaceTimerInstanceState
-