Package org.apache.camel.util.backoff
Interface BackOffTimer.Task
- Enclosing class:
- BackOffTimer
public static interface BackOffTimer.Task
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Cancel the task.The back-off associated with this task.longThe number of attempts so far.longThe current computed delay.longThe current elapsed time.longThe time the first attempt was performed.longThe time the last attempt has been performed.longAn indication about the time the next attempt will be made.Gets the task status.voidreset()Reset the task.voidwhenComplete(BiConsumer<BackOffTimer.Task, Throwable> whenCompleted) Action to execute when the context is completed (cancelled or exhausted)
-
Method Details
-
getBackOff
The back-off associated with this task. -
getStatus
Gets the task status. -
getCurrentAttempts
long getCurrentAttempts()The number of attempts so far. -
getCurrentDelay
long getCurrentDelay()The current computed delay. -
getCurrentElapsedTime
long getCurrentElapsedTime()The current elapsed time. -
getFirstAttemptTime
long getFirstAttemptTime()The time the first attempt was performed. -
getLastAttemptTime
long getLastAttemptTime()The time the last attempt has been performed. -
getNextAttemptTime
long getNextAttemptTime()An indication about the time the next attempt will be made. -
reset
void reset()Reset the task. -
cancel
void cancel()Cancel the task. -
whenComplete
Action to execute when the context is completed (cancelled or exhausted)- Parameters:
whenCompleted- the consumer.
-