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 TypeMethodDescriptionvoid
cancel()
Cancel the task.The back-off associated with this task.long
The number of attempts so far.long
The current computed delay.long
The current elapsed time.long
The time the first attempt was performed.long
The time the last attempt has been performed.long
An indication about the time the next attempt will be made.Gets the task status.void
reset()
Reset the task.void
whenComplete
(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.
-