open class CircuitBreaker
An implementation of the circuit breaker pattern for Vert.x NOTE: This class has been automatically generated from the io.vertx.circuitbreaker.CircuitBreaker non RX-ified interface using Vert.x codegen.
CircuitBreaker(delegate: CircuitBreaker) |
static val __TYPE_ARG: TypeArg<CircuitBreaker> |
open fun close(): CircuitBreaker
Closes the circuit breaker. It stops sending events on its state on the event bus. This method is not related to the |
|
open fun closeHandler(handler: Handler<Void>): CircuitBreaker
Sets a invoked when the circuit breaker state switches to close. |
|
open static fun create(name: String, vertx: Vertx, options: CircuitBreakerOptions): CircuitBreaker
Creates a new instance of io.vertx.rxjava.circuitbreaker.CircuitBreaker. open static fun create(name: String, vertx: Vertx): CircuitBreaker
Creates a new instance of io.vertx.rxjava.circuitbreaker.CircuitBreaker, with default options. |
|
open fun equals(other: Any?): Boolean |
|
open fun <T : Any> execute(command: Handler<Future<T>>): Future<T>
Same as |
|
open fun <T : Any> executeAndReport(resultFuture: Future<T>, command: Handler<Future<T>>): CircuitBreaker
Same as |
|
open fun <T : Any> executeAndReportWithFallback(resultFuture: Future<T>, command: Handler<Future<T>>, fallback: Function<Throwable, T>): CircuitBreaker
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 |
|
open fun <T : Any> executeCommand(command: Handler<Future<T>>, handler: Handler<AsyncResult<T>>): Unit
Same as |
|
open fun <T : Any> executeCommandWithFallback(command: Handler<Future<T>>, fallback: Function<Throwable, T>, handler: Handler<AsyncResult<T>>): Unit
Same as |
|
open fun <T : Any> executeWithFallback(command: Handler<Future<T>>, fallback: Function<Throwable, T>): Future<T>
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. This method returns a object to retrieve the status and result of the operation, with the status being a success or a failure. If the fallback is called, the returned future is successfully completed with the value returned from the fallback. If the fallback throws an exception, the returned future is marked as failed. |
|
open fun failureCount(): Long |
|
open fun <T : Any> fallback(handler: Function<Throwable, T>): CircuitBreaker
Sets a default invoked when the bridge is open to handle the "request", or on failure if io.vertx.circuitbreaker.CircuitBreakerOptions is enabled. The function gets the exception as parameter and returns the fallback result. |
|
open fun getDelegate(): CircuitBreaker |
|
open fun halfOpenHandler(handler: Handler<Void>): CircuitBreaker
Sets a invoked when the circuit breaker state switches to half-open. |
|
open fun hashCode(): Int |
|
open fun name(): String |
|
open static fun newInstance(arg: CircuitBreaker): CircuitBreaker |
|
open fun open(): CircuitBreaker
Explicitly opens the circuit. |
|
open fun openHandler(handler: Handler<Void>): CircuitBreaker
Sets a invoked when the circuit breaker state switches to open. |
|
open fun reset(): CircuitBreaker
Resets the circuit breaker state (number of failure set to 0 and state set to closed). |
|
open fun <T : Any> rxExecuteCommand(command: Handler<Future<T>>): Single<T>
Same as |
|
open fun <T : Any> rxExecuteCommandWithFallback(command: Handler<Future<T>>, fallback: Function<Throwable, T>): Single<T>
Same as |
|
open fun state(): CircuitBreakerState |
|
open fun toString(): String |