Package org.apache.camel.util.backoff
Interface BackOffTimer.Task
- All Known Implementing Classes:
BackOffTimerTask
- Enclosing interface:
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.The task failed for some un-expected exceptionlong
The time the first attempt was performed.long
The time the last attempt has been performed.getName()
Name of this tasklong
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
-
getName
Name of this task -
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. -
getException
The task failed for some un-expected exception -
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.
-