Class RetryContext
- java.lang.Object
-
- org.ovirt.vdsm.jsonrpc.client.utils.retry.RetryContext
-
public class RetryContext extends java.lang.Object
RetryConext
represents current execution retry state. Initially context is populated form theRetryPolicy
provided for the execution.
-
-
Constructor Summary
Constructors Constructor Description RetryContext(ClientPolicy policy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
decreaseAttempts()
int
getNumberOfAttempts()
int
getTimeout()
java.util.concurrent.TimeUnit
getTimeUnit()
boolean
isExceptionRetryable(java.lang.Exception e)
void
waitOperation()
-
-
-
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()
-
-