Class FailurePolicy<T>
java.lang.Object
io.vertx.reactivex.circuitbreaker.FailurePolicy<T>
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
A failure policy for the
CircuitBreaker.
The default policy is to consider an asynchronous result as a failure if returns true.
Nevertheless, sometimes this is not good enough. For example, an HTTP Client could return a response, but with an unexpected status code.
In this case, a custom failure policy can be configured with CircuitBreaker.failurePolicy(FailurePolicy).
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.vertx.lang.rx.TypeArg<FailurePolicy> final io.vertx.lang.rx.TypeArg<T> -
Constructor Summary
ConstructorsConstructorDescriptionFailurePolicy(FailurePolicy delegate) FailurePolicy(Object delegate, io.vertx.lang.rx.TypeArg<T> typeArg_0) -
Method Summary
Modifier and TypeMethodDescriptionstatic <U> FailurePolicy<U> The default policy, which considers an asynchronous result as a failure if returnstrue.booleaninthashCode()static <T> FailurePolicy<T> newInstance(FailurePolicy arg) static <T> FailurePolicy<T> newInstance(FailurePolicy arg, io.vertx.lang.rx.TypeArg<T> __typeArg_T) booleanInvoked by theCircuitBreakerwhen an operation completes.booleanInvoked by theCircuitBreakerwhen an operation completes.toString()
-
Field Details
-
__TYPE_ARG
-
__typeArg_0
-
-
Constructor Details
-
FailurePolicy
-
FailurePolicy
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
defaultPolicy
The default policy, which considers an asynchronous result as a failure if returnstrue.- Returns:
-
test
Invoked by theCircuitBreakerwhen an operation completes.- Parameters:
future- a completed future- Returns:
trueif the asynchronous result should be considered as a failure,falseotherwise
-
test
Invoked by theCircuitBreakerwhen an operation completes.- Parameters:
future- a completed future- Returns:
trueif the asynchronous result should be considered as a failure,falseotherwise
-
newInstance
-
newInstance
public static <T> FailurePolicy<T> newInstance(FailurePolicy arg, io.vertx.lang.rx.TypeArg<T> __typeArg_T)
-