public class NoopCircuitBreaker extends java.lang.Object implements CircuitBreaker
CircuitBreaker.Type| Modifier and Type | Field and Description |
|---|---|
static int |
LIMIT |
FIELDDATA, IN_FLIGHT_REQUESTS, PARENT, REQUEST| Constructor and Description |
|---|
NoopCircuitBreaker(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
double |
addEstimateBytesAndMaybeBreak(long bytes,
java.lang.String label)
add bytes to the breaker and maybe trip
|
long |
addWithoutBreaking(long bytes)
Adjust the circuit breaker without tripping
|
void |
circuitBreak(java.lang.String fieldName,
long bytesNeeded)
Trip the circuit breaker
|
long |
getLimit() |
java.lang.String |
getName() |
double |
getOverhead() |
long |
getTrippedCount() |
long |
getUsed() |
public static final int LIMIT
public void circuitBreak(java.lang.String fieldName,
long bytesNeeded)
CircuitBreakercircuitBreak in interface CircuitBreakerfieldName - name of the field responsible for tripping the breakerbytesNeeded - bytes asked for but unable to be allocatedpublic double addEstimateBytesAndMaybeBreak(long bytes,
java.lang.String label)
throws CircuitBreakingException
CircuitBreakeraddEstimateBytesAndMaybeBreak in interface CircuitBreakerbytes - number of bytes to addlabel - string label describing the bytes being addedCircuitBreakingExceptionpublic long addWithoutBreaking(long bytes)
CircuitBreakeraddWithoutBreaking in interface CircuitBreakerpublic long getUsed()
getUsed in interface CircuitBreakerpublic long getLimit()
getLimit in interface CircuitBreakerpublic double getOverhead()
getOverhead in interface CircuitBreakerpublic long getTrippedCount()
getTrippedCount in interface CircuitBreakerpublic java.lang.String getName()
getName in interface CircuitBreaker