Class RetryContext

java.lang.Object
org.ovirt.vdsm.jsonrpc.client.utils.retry.RetryContext

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

    • numberOfAttempts

      private int numberOfAttempts
    • timeout

      private int timeout
    • policy

      private ClientPolicy policy
  • Constructor Details

  • Method Details

    • isExceptionRetryable

      public boolean isExceptionRetryable(Exception e)
    • getNumberOfAttempts

      public int getNumberOfAttempts()
    • waitOperation

      public void waitOperation() throws InterruptedException
      Throws:
      InterruptedException
    • getTimeout

      public int getTimeout()
    • getTimeUnit

      public TimeUnit getTimeUnit()
    • decreaseAttempts

      public void decreaseAttempts()