Package io.vertx.mutiny.circuitbreaker
Class RetryPolicy
java.lang.Object
io.vertx.mutiny.circuitbreaker.RetryPolicy
- All Implemented Interfaces:
MutinyDelegate
A policy for retry execution.
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- See Also:
-
RetryPolicy
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRetryPolicy(io.vertx.circuitbreaker.RetryPolicy delegate) Create a new instance ofRetryPolicydelegating to the given (non-null) instance ofRetryPolicy.RetryPolicy(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionstatic RetryPolicyconstantDelay(long delay) Create a constant delay retry policy.longCompute a delay in milliseconds before retry is executed.booleanstatic RetryPolicyexponentialDelayWithJitter(long initialDelay, long maxDelay) Create an exponential delay with jitter retry policy.io.vertx.circuitbreaker.RetryPolicyGet the delegate instance.inthashCode()static RetryPolicylinearDelay(long initialDelay, long maxDelay) Create a linear delay retry policy.static RetryPolicynewInstance(io.vertx.circuitbreaker.RetryPolicy delegate) Creates a new instance of theRetryPolicy.toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
RetryPolicy
public RetryPolicy(io.vertx.circuitbreaker.RetryPolicy delegate) Create a new instance ofRetryPolicydelegating to the given (non-null) instance ofRetryPolicy. -
RetryPolicy
-
-
Method Details
-
getDelegate
public io.vertx.circuitbreaker.RetryPolicy getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
constantDelay
Create a constant delay retry policy.- Parameters:
delay- the constant delay in milliseconds
-
linearDelay
Create a linear delay retry policy.- Parameters:
initialDelay- the initial delay in millisecondsmaxDelay- maximum delay in milliseconds
-
exponentialDelayWithJitter
Create an exponential delay with jitter retry policy.Based on the Full Jitter approach described in Exponential Backoff And Jitter.
- Parameters:
initialDelay- the initial delay in millisecondsmaxDelay- maximum delay in milliseconds
-
delay
Compute a delay in milliseconds before retry is executed.- Parameters:
failure- the failure of the previous execution attemptretryCount- the number of times operation has been retried already- Returns:
- a delay in milliseconds before retry is executed
-
newInstance
Creates a new instance of theRetryPolicy. -
hashCode
public int hashCode() -
equals
-
toString
-