Package org.apache.camel.util.backoff
Interface BackOffTimer.Task
-
- Enclosing class:
- BackOffTimer
public static interface BackOffTimer.Task
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classBackOffTimer.Task.Status
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcancel()Cancel the task.BackOffgetBackOff()The back-off associated with this task.longgetCurrentAttempts()The number of attempts so far.longgetCurrentDelay()The current computed delay.longgetCurrentElapsedTime()The current elapsed time.longgetFirstAttemptTime()The time the first attempt was performed.longgetLastAttemptTime()The time the last attempt has been performed.longgetNextAttemptTime()An indication about the time the next attempt will be made.BackOffTimer.Task.StatusgetStatus()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 Detail
-
getBackOff
BackOff getBackOff()
The back-off associated with this task.
-
getStatus
BackOffTimer.Task.Status 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
void whenComplete(BiConsumer<BackOffTimer.Task,Throwable> whenCompleted)
Action to execute when the context is completed (cancelled or exhausted)- Parameters:
whenCompleted- the consumer.
-
-