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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FeedClient.CircuitBreakerA circuit breaker which is always closed. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidfailure(HttpResponse response) Called by the client whenever an error HTTP response is received.default voidCalled by the client whenever an exception occurs trying to obtain a HTTP response.state()The current state of the circuit breaker.default voidsuccess()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.
-