public abstract class StatelessBackOffPolicy extends Object implements BackOffPolicy
BackOffPolicy implementations that maintain no
state across invocations.| Constructor and Description |
|---|
StatelessBackOffPolicy() |
| Modifier and Type | Method and Description |
|---|---|
void |
backOff(BackOffContext backOffContext)
Delegates directly to the
doBackOff() method without passing on
the BackOffContext argument which is not needed for stateless
implementations. |
protected abstract void |
doBackOff()
Sub-classes should implement this method to perform the actual back off.
|
BackOffContext |
start(RetryContext status)
Returns '
null'. |
public final void backOff(BackOffContext backOffContext) throws BackOffInterruptedException
doBackOff() method without passing on
the BackOffContext argument which is not needed for stateless
implementations.backOff in interface BackOffPolicybackOffContext - the BackOffContextBackOffInterruptedException - if the attempt at back off is
interrupted.public BackOffContext start(RetryContext status)
null'. Subclasses can add behaviour, e.g.
initial sleep before first attempt.start in interface BackOffPolicystatus - the RetryContext context, which might contain information
that we can use to decide how to proceed.BackOffContext or 'null'.protected abstract void doBackOff()
throws BackOffInterruptedException
BackOffInterruptedExceptionCopyright © 2018 SpringSource. All rights reserved.