Class RetryContext


  • public class RetryContext
    extends java.lang.Object
    RetryConext represents current execution retry state. Initially context is populated form the RetryPolicy provided for the execution.
    • Field Detail

      • numberOfAttempts

        private int numberOfAttempts
      • timeout

        private int timeout
    • Constructor Detail

      • RetryContext

        public RetryContext​(ClientPolicy policy)
    • Method Detail

      • isExceptionRetryable

        public boolean isExceptionRetryable​(java.lang.Exception e)
      • getNumberOfAttempts

        public int getNumberOfAttempts()
      • waitOperation

        public void waitOperation()
                           throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • getTimeout

        public int getTimeout()
      • getTimeUnit

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

        public void decreaseAttempts()