Modifier and Type | Method and Description |
---|---|
CircuitBreaker |
CircuitBreaker.close()
Closes the circuit breaker.
|
CircuitBreaker |
CircuitBreaker.closeHandler(io.vertx.core.Handler<Void> handler)
Sets a
Handler invoked when the circuit breaker state switches to close. |
static CircuitBreaker |
CircuitBreaker.create(String name,
io.vertx.core.Vertx vertx)
Creates a new instance of
CircuitBreaker , with default options. |
static CircuitBreaker |
CircuitBreaker.create(String name,
io.vertx.core.Vertx vertx,
CircuitBreakerOptions options)
Creates a new instance of
CircuitBreaker . |
<T> CircuitBreaker |
CircuitBreaker.executeAndReport(io.vertx.core.Future<T> resultFuture,
io.vertx.core.Handler<io.vertx.core.Future<T>> command)
Same as
executeAndReportWithFallback(Future, Handler, Function) but using the circuit breaker default
fallback. |
<T> CircuitBreaker |
CircuitBreaker.executeAndReportWithFallback(io.vertx.core.Future<T> resultFuture,
io.vertx.core.Handler<io.vertx.core.Future<T>> command,
Function<Throwable,T> fallback)
Executes the given operation with the circuit breaker control.
|
<T> CircuitBreaker |
CircuitBreaker.fallback(Function<Throwable,T> handler)
Sets a default
Function invoked when the bridge is open to handle the "request", or on failure
if CircuitBreakerOptions.isFallbackOnFailure() is enabled. |
CircuitBreaker |
CircuitBreaker.halfOpenHandler(io.vertx.core.Handler<Void> handler)
Sets a
Handler invoked when the circuit breaker state switches to half-open. |
CircuitBreaker |
CircuitBreaker.open()
Explicitly opens the circuit.
|
CircuitBreaker |
CircuitBreaker.openHandler(io.vertx.core.Handler<Void> handler)
Sets a
Handler invoked when the circuit breaker state switches to open. |
CircuitBreaker |
CircuitBreaker.reset()
Resets the circuit breaker state (number of failure set to 0 and state set to closed).
|
Copyright © 2017. All rights reserved.