|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.alarmpoint.integrationagent.exceptions.retriable.AbstractRetryPolicy
com.alarmpoint.integrationagent.exceptions.retriable.MaxTimeRetryPolicy
public class MaxTimeRetryPolicy
A retry policy that enforces a maximum elapsed time for retries and a customizable delay between attempts.
Constructor Summary | |
---|---|
MaxTimeRetryPolicy(long maxElapsedMillis,
DelayPolicy delayPolicy)
Default constructor. |
Method Summary | |
---|---|
boolean |
isRetriable(int numAttempts,
long firstAttemptTimestamp)
Determines whether a retry should be attempted. |
Methods inherited from class com.alarmpoint.integrationagent.exceptions.retriable.AbstractRetryPolicy |
---|
getDelay |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MaxTimeRetryPolicy(long maxElapsedMillis, DelayPolicy delayPolicy)
maxElapsedMillis
- -
the maximum time (in milliseconds) that can elapse between the
first attempt and subsequent retries; must be > 0delayPolicy
- -
the policy for computing delays between attempts; must be
non-nullMethod Detail |
---|
public boolean isRetriable(int numAttempts, long firstAttemptTimestamp)
numAttempts
- -
the number of previous attempts (including first attempt and
previous retries); assumed to be >= 1firstAttemptTimestamp
- -
the timestamp (milliseconds since epoch) of the first attempt
to process the message; may be < 0 if information not
available
true
if a retry should be attempted; otherwise,
false
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |