Class TimerId
java.lang.Object
io.superdurable.dex.TimerId
Selects a timer condition within one Step execution.
A timer can be selected by the stable condition ID supplied to
Timer.byDuration(java.time.Duration, String) or by its zero-based position among the
Step's timer conditions. Prefer a condition ID when definitions may be reordered.
client.skipTimer(
"order-123",
StepExecutionId.of("AwaitPayment"),
TimerId.byConditionId("payment-deadline"));
-
Method Summary
Modifier and TypeMethodDescriptionstatic TimerIdbyConditionId(String conditionId) Selects a timer by its user-defined condition ID.static TimerIdbyConditionIndex(int index) Selects a timer by its condition index.
-
Method Details
-
byConditionId
Selects a timer by its user-defined condition ID.- Parameters:
conditionId- the nonblank ID assigned when creating the timer- Returns:
- a timer selector for that condition ID
- Throws:
IllegalArgumentException- ifconditionIdisnullor blank
-
byConditionIndex
Selects a timer by its condition index.- Parameters:
index- the zero-based timer condition index- Returns:
- a timer selector for that index
-