public class NoopCircuitBreaker extends Object implements CircuitBreaker
CircuitBreaker
if disabled by the user.CircuitBreaker.CompletionCallback, CircuitBreaker.State
Modifier and Type | Field and Description |
---|---|
static NoopCircuitBreaker |
INSTANCE |
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.
|
public static final NoopCircuitBreaker INSTANCE
public void track()
CircuitBreaker
track
in interface CircuitBreaker
public void markSuccess()
CircuitBreaker
markSuccess
in interface CircuitBreaker
public void markFailure()
CircuitBreaker
markFailure
in interface CircuitBreaker
public void reset()
CircuitBreaker
reset
in interface CircuitBreaker
public boolean allowsRequest()
CircuitBreaker
allowsRequest
in interface CircuitBreaker
public CircuitBreaker.State state()
CircuitBreaker
state
in interface CircuitBreaker
Copyright © 2020 Couchbase, Inc.. All rights reserved.