Package ai.vespa.feed.client
Interface FeedClient.CircuitBreaker
-
- All Known Implementing Classes:
GracePeriodCircuitBreaker
- Enclosing interface:
- FeedClient
public static interface FeedClient.CircuitBreaker
Allows slowing down or halting completely operations against the configured endpoint on high failure rates.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
FeedClient.CircuitBreaker.State
-
Field Summary
Fields Modifier and Type Field Description static FeedClient.CircuitBreaker
FUSED
A circuit breaker which is always closed.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
failure(ai.vespa.feed.client.HttpResponse response)
Called by the client whenever an error HTTP response is received.default void
failure(java.lang.Throwable cause)
Called by the client whenever an exception occurs trying to obtain a HTTP response.FeedClient.CircuitBreaker.State
state()
The current state of the circuit breaker.default void
success()
Called by the client whenever a successful response is obtained.
-
-
-
Field Detail
-
FUSED
static final FeedClient.CircuitBreaker FUSED
A circuit breaker which is always closed.
-
-
Method Detail
-
success
default void success()
Called by the client whenever a successful response is obtained.
-
failure
default void failure(ai.vespa.feed.client.HttpResponse response)
Called by the client whenever an error HTTP response is received.
-
failure
default void failure(java.lang.Throwable cause)
Called by the client whenever an exception occurs trying to obtain a HTTP response.
-
state
FeedClient.CircuitBreaker.State state()
The current state of the circuit breaker.
-
-