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 class
BackOffTimer.Task.Status
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cancel()
Cancel the task.BackOff
getBackOff()
The back-off associated with this task.long
getCurrentAttempts()
The number of attempts so far.long
getCurrentDelay()
The current computed delay.long
getCurrentElapsedTime()
The current elapsed time.long
getFirstAttemptTime()
The time the first attempt was performed.long
getLastAttemptTime()
The time the last attempt has been performed.long
getNextAttemptTime()
An indication about the time the next attempt will be made.BackOffTimer.Task.Status
getStatus()
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 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.
-
-