Class RetryPolicy

  • All Implemented Interfaces:
    java.io.Serializable

    public class RetryPolicy
    extends java.lang.Object
    implements java.io.Serializable
    Retry policy for a retryable code.
    Author:
    Mahmoud Ben Hassine ([email protected])
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      RetryPolicy​(int maxAttempts, long delay, java.util.concurrent.TimeUnit timeUnit)
      Create a new RetryPolicy.
    • Constructor Detail

      • RetryPolicy

        public RetryPolicy​(int maxAttempts,
                           long delay,
                           java.util.concurrent.TimeUnit timeUnit)
        Create a new RetryPolicy.
        Parameters:
        maxAttempts - number of retries
        delay - to wait between retries
        timeUnit - of the delay to wait between retries
    • Method Detail

      • getMaxAttempts

        public int getMaxAttempts()
      • getDelay

        public long getDelay()
      • getTimeUnit

        public java.util.concurrent.TimeUnit getTimeUnit()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object