Interface FailurePolicy<T>
A failure policy for the
CircuitBreaker.
The default policy is to consider an asynchronous result as a failure if AsyncResult.failed() 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).
-
Method Summary
Modifier and TypeMethodDescriptionstatic <U> FailurePolicy<U> The default policy, which considers an asynchronous result as a failure ifAsyncResult.failed()returnstrue.booleanInvoked by theCircuitBreakerwhen an operation completes.
-
Method Details
-
defaultPolicy
The default policy, which considers an asynchronous result as a failure ifAsyncResult.failed()returnstrue. -
test
-