com.alarmpoint.integrationagent.exceptions.retriable
Interface RetryPolicy

All Superinterfaces:
DelayPolicy
All Known Implementing Classes:
AbstractRetryPolicy, MaxAttemptRetryPolicy, MaxTimeRetryPolicy

public interface RetryPolicy
extends DelayPolicy

An interface that provides customizable retry behaviour, both in terms of determining how many retries will be attempted and the amount of time to wait between retries.


Method Summary
 boolean isRetriable(int numAttempts, long firstAttemptTimestamp)
          Determines whether a retry should be attempted.
 
Methods inherited from interface com.alarmpoint.integrationagent.exceptions.retriable.DelayPolicy
getDelay
 

Method Detail

isRetriable

boolean isRetriable(int numAttempts,
                    long firstAttemptTimestamp)
Determines whether a retry should be attempted.

Parameters:
numAttempts - - the number of previous attempts (including first attempt and previous retries); assumed to be >= 1
firstAttemptTimestamp - - the timestamp (milliseconds since epoch) of the first attempt to process the message; may be < 0 if information not available
Returns:
true if a retry should be attempted; otherwise, false