Interface TaskExecutionBackOff
-
- All Known Implementing Classes:
ExponentialTaskExecutionBackOff
,FixedTaskExecutionBackOff
public interface TaskExecutionBackOff
-
-
Field Summary
Fields Modifier and Type Field Description static long
STOP
Return value ofnextBackOff(Object, RqueueMessage, int)
that indicates that the task should not be executed further.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
nextBackOff(java.lang.Object object, RqueueMessage rqueueMessage, int failureCount)
Return the number of milliseconds to wait for the same message to be consumed by other consumers.
-
-
-
Field Detail
-
STOP
static final long STOP
Return value ofnextBackOff(Object, RqueueMessage, int)
that indicates that the task should not be executed further.- See Also:
- Constant Field Values
-
-
Method Detail
-
nextBackOff
long nextBackOff(java.lang.Object object, RqueueMessage rqueueMessage, int failureCount)
Return the number of milliseconds to wait for the same message to be consumed by other consumers. (-1L) to indicate that no further enqueue should be made for the message.- Parameters:
object
- message that's fetchedrqueueMessage
- raw messagefailureCount
- number of times this message has failed.- Returns:
- backoff in the millisecond.
-
-