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

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isRetriable(int numAttempts, long firstAttemptTimestamp)` Determines whether a retry should be attempted.

    - ### Methods inherited from interface com.alarmpoint.integrationagent.exceptions.retriable.DelayPolicy

      `getDelay, toString`

- - ### 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 equal or more than 1
        `firstAttemptTimestamp` - - the timestamp (milliseconds since epoch) of the first attempt to process the message; may be less than 0 if information not available
      Returns:
        `true` if a retry should be attempted; otherwise, `false`