Package io.vertx.mutiny.circuitbreaker
Class FailurePolicy<T>
- java.lang.Object
-
- io.vertx.mutiny.circuitbreaker.FailurePolicy<T>
-
public class FailurePolicy<T> extends Object
A failure policy for theCircuitBreaker
.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
NOTE: This class has been automatically generated from theCircuitBreaker.failurePolicy(io.vertx.mutiny.circuitbreaker.FailurePolicy<T>)
.original
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<FailurePolicy>
__TYPE_ARG
TypeArg<T>
__typeArg_0
-
Constructor Summary
Constructors Constructor Description FailurePolicy(io.vertx.circuitbreaker.FailurePolicy delegate)
FailurePolicy(io.vertx.circuitbreaker.FailurePolicy delegate, TypeArg<T> typeArg_0)
FailurePolicy(Object delegate, TypeArg<T> typeArg_0)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <U> FailurePolicy<U>
defaultPolicy()
boolean
equals(Object o)
io.vertx.circuitbreaker.FailurePolicy
getDelegate()
int
hashCode()
static <T> FailurePolicy<T>
newInstance(io.vertx.circuitbreaker.FailurePolicy arg)
static <T> FailurePolicy<T>
newInstance(io.vertx.circuitbreaker.FailurePolicy arg, TypeArg<T> __typeArg_T)
boolean
test(io.smallrye.mutiny.Uni<T> future)
String
toString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<FailurePolicy> __TYPE_ARG
-
-
Method Detail
-
getDelegate
public io.vertx.circuitbreaker.FailurePolicy getDelegate()
-
defaultPolicy
public static <U> FailurePolicy<U> defaultPolicy()
- Returns:
-
test
public boolean test(io.smallrye.mutiny.Uni<T> future)
- Parameters:
future
- a completed future- Returns:
true
if the asynchronous result should be considered as a failure,false
otherwise
-
newInstance
public static <T> FailurePolicy<T> newInstance(io.vertx.circuitbreaker.FailurePolicy arg)
-
newInstance
public static <T> FailurePolicy<T> newInstance(io.vertx.circuitbreaker.FailurePolicy arg, TypeArg<T> __typeArg_T)
-
-