|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.alarmpoint.integrationagent.exceptions.retriable.AbstractRetryPolicy
public abstract class AbstractRetryPolicy
A base class that provides pluggable delays so that subclasses need only
implement RetryPolicy.isRetriable(int, long)
.
Constructor Summary | |
---|---|
protected |
AbstractRetryPolicy(DelayPolicy delayPolicy)
Default constructor. |
Method Summary | |
---|---|
long |
getDelay(int numAttempts,
long lastDelay)
Gets the minimum amount of time that must elapse before the next retry attempt. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.alarmpoint.integrationagent.exceptions.retriable.RetryPolicy |
---|
isRetriable |
Constructor Detail |
---|
protected AbstractRetryPolicy(DelayPolicy delayPolicy)
delayPolicy
- -
the policy that computes delays between retry attempts; must
be non-nullMethod Detail |
---|
public long getDelay(int numAttempts, long lastDelay)
getDelay
in interface DelayPolicy
numAttempts
- -
the number of previous attempts (including first attempt and
retries); assumed to be >= 1lastDelay
- -
the delay (in milliseconds) returned by the previous call to
this method (i.e., with numAttempts-1
); -1 if
not previously code (i.e., when numAttempts==0
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |