Package ai.vespa.feed.client
Interface FeedClient.CircuitBreaker
- 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
-
Field Summary
Modifier and TypeFieldDescriptionstatic final FeedClient.CircuitBreaker
A circuit breaker which is always closed. -
Method Summary
Modifier and TypeMethodDescriptiondefault void
failure
(HttpResponse response) Called by the client whenever an error HTTP response is received.default void
Called by the client whenever an exception occurs trying to obtain a HTTP response.state()
The current state of the circuit breaker.default void
success()
Called by the client whenever a successful response is obtained.
-
Field Details
-
FUSED
A circuit breaker which is always closed.
-
-
Method Details
-
success
default void success()Called by the client whenever a successful response is obtained. -
failure
Called by the client whenever an error HTTP response is received. -
failure
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.
-