Closes the circuit breaker. It stops sending events on its state on the event bus.
This method is not related to the close
state of the circuit breaker. To set the circuit breaker in the
close
state, use {@link CircuitBreaker#reset}.
Sets a invoked when the circuit breaker state switches to close.
Same as {@link CircuitBreaker#executeWithFallback} but using the circuit breaker default fallback.
Same as {@link CircuitBreaker#executeWithFallback} but using the circuit breaker default fallback.
Same as {@link CircuitBreaker#executeAndReportWithFallback} but using the circuit breaker default fallback.
Executes the given operation with the circuit breaker control. The operation is generally calling an external system. The operation receives a object as parameter and must call when the operation has terminated successfully. The operation must also call in case of failure.
The operation is not invoked if the circuit breaker is open, and the given fallback is called immediately. The circuit breaker also monitor the completion of the operation before a configure timeout. The operation is considered as failed if it does not terminate in time.
Unlike {@link CircuitBreaker#executeWithFallback}, this method does return a object, but let the caller pass a object on which the result is reported. If the fallback is called, the future is successfully completed with the value returned by the fallback function. If the fallback throws an exception, the future is marked as failed.
Same as {@link CircuitBreaker#executeWithFallback} but using a callback.
Same as {@link CircuitBreaker#executeWithFallback} but using a callback.
Sets a default invoked when the bridge is open to handle the "request", or on failure if CircuitBreakerOptions is enabled.
The function gets the exception as parameter and returns the fallback result.
Sets a invoked when the circuit breaker state switches to half-open.
Explicitly opens the circuit.
Sets a invoked when the circuit breaker state switches to open.
Resets the circuit breaker state (number of failure set to 0 and state set to closed).
Set a RetryPolicy which computes a delay before retry execution.
Creates a new instance of CircuitBreaker.
Creates a new instance of CircuitBreaker, with default options.
Generated using TypeDoc
An implementation of the circuit breaker pattern for Vert.x