Class NoopCircuitBreaker
java.lang.Object
com.couchbase.client.core.endpoint.NoopCircuitBreaker
- All Implemented Interfaces:
CircuitBreaker
A simple noop implementation of the
CircuitBreaker
if disabled by the user.- Since:
- 2.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.couchbase.client.core.endpoint.CircuitBreaker
CircuitBreaker.CompletionCallback, CircuitBreaker.State
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if requests are allowed to go through and be tracked.void
The tracked request is marked failure.void
The tracked request is marked succeeded.void
reset()
Resets this circuit breaker to its initial state.state()
Returns the current state of the circuit breaker.void
track()
Marks that a circuit breaker should start tracking.
-
Field Details
-
INSTANCE
-
-
Method Details
-
track
public void track()Description copied from interface:CircuitBreaker
Marks that a circuit breaker should start tracking.- Specified by:
track
in interfaceCircuitBreaker
-
markSuccess
public void markSuccess()Description copied from interface:CircuitBreaker
The tracked request is marked succeeded.- Specified by:
markSuccess
in interfaceCircuitBreaker
-
markFailure
public void markFailure()Description copied from interface:CircuitBreaker
The tracked request is marked failure.- Specified by:
markFailure
in interfaceCircuitBreaker
-
reset
public void reset()Description copied from interface:CircuitBreaker
Resets this circuit breaker to its initial state.- Specified by:
reset
in interfaceCircuitBreaker
-
allowsRequest
public boolean allowsRequest()Description copied from interface:CircuitBreaker
Returns true if requests are allowed to go through and be tracked.- Specified by:
allowsRequest
in interfaceCircuitBreaker
-
state
Description copied from interface:CircuitBreaker
Returns the current state of the circuit breaker.- Specified by:
state
in interfaceCircuitBreaker
-