public interface CircuitBreaker
CircuitBreaker
interface defines the external integration points between an
implementation and its calling BaseEndpoint
.
See the individual implementation for details on how they work. Note that they are all
configured through the CircuitBreakerConfig
that is configured on the environment on
a per service basis and applied on a per endpoint basis.
Modifier and Type | Interface and Description |
---|---|
static interface |
CircuitBreaker.CompletionCallback
Defines if a request is considered a success or a failure.
|
static class |
CircuitBreaker.State
Represents all the states a circuit breaker can be in, possibly.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowsRequest()
Returns true if requests are allowed to go through and be tracked.
|
void |
markFailure()
The tracked request is marked failure.
|
void |
markSuccess()
The tracked request is marked succeeded.
|
void |
reset()
Resets this circuit breaker to its initial state.
|
CircuitBreaker.State |
state()
Returns the current state of the circuit breaker.
|
void |
track()
Marks that a circuit breaker should start tracking.
|
void track()
void markSuccess()
void markFailure()
void reset()
boolean allowsRequest()
CircuitBreaker.State state()
Copyright © 2020 Couchbase, Inc.. All rights reserved.