OperationRetryControl Class
- java.
lang. Object - microsoft.
servicefabric. services. communication. client. OperationRetryControl
- microsoft.
public class OperationRetryControl
Specifies the retry policy for the exceptions got on the communication from client to service.
Method Summary
Modifier and Type | Method and Description |
---|---|
Throwable |
getException()
Exception to report for the operation, if ShouldRetry is false. By default this is the same exception as the reported exception, however in some cases the Factory may choose to transform the reported exception to a more meaningful exception. |
String |
getExceptionId()
String that uniquely identifies the exception type. |
int |
getMaxRetryCount()
Max number of times this operation should be retried if the ShouldRetry is true |
Duration |
getRetryDelay()
The operation should be retried after this delay if the ShouldRetry is true. |
boolean | isTransient() |
void |
setException(Throwable exception)
Exception to report for the operation, if ShouldRetry is false. By default this is the same exception as the reported exception, however in some cases the Factory may choose to transform the reported exception to a more meaningful exception. |
void |
setExceptionId(String exceptionId)
String that uniquely identifies the exception type. |
void | setIsTransient(boolean value) |
void |
setMaxRetryCount(int maxRetryCount)
Max number of times this operation should be retried if the ShouldRetry is true |
void |
setRetryDelay(Duration retryDelay)
The operation should be retried after this delay if the ShouldRetry is true. |
void |
setShouldRetry(boolean shouldRetry)
Indicates whether the operation should be retried or not. |
boolean |
shouldRetry()
Indicates whether the operation should be retried or not. |
Method Details
getException
public Throwable getException()
Exception to report for the operation, if ShouldRetry is false. By default this is the same exception as the reported exception, however in some cases the Factory may choose to transform the reported exception to a more meaningful exception.
Returns:
getExceptionId
public String getExceptionId()
String that uniquely identifies the exception type.
Returns:
getMaxRetryCount
public int getMaxRetryCount()
Max number of times this operation should be retried if the ShouldRetry is true
Returns:
getRetryDelay
public Duration getRetryDelay()
The operation should be retried after this delay if the ShouldRetry is true.
Returns:
isTransient
public boolean isTransient()
setException
public void setException(Throwable exception)
Exception to report for the operation, if ShouldRetry is false. By default this is the same exception as the reported exception, however in some cases the Factory may choose to transform the reported exception to a more meaningful exception.
Parameters:
setExceptionId
public void setExceptionId(String exceptionId)
String that uniquely identifies the exception type.
Parameters:
setIsTransient
public void setIsTransient(boolean value)
Parameters:
setMaxRetryCount
public void setMaxRetryCount(int maxRetryCount)
Max number of times this operation should be retried if the ShouldRetry is true
Parameters:
setRetryDelay
public void setRetryDelay(Duration retryDelay)
The operation should be retried after this delay if the ShouldRetry is true.
Parameters:
setShouldRetry
public void setShouldRetry(boolean shouldRetry)
Indicates whether the operation should be retried or not.
Parameters:
shouldRetry
public boolean shouldRetry()
Indicates whether the operation should be retried or not.
Returns:
Applies to
Azure SDK for Java