public interface CircuitBreaker
Modifier and Type | Interface and Description |
---|---|
static class |
CircuitBreaker.Type |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FIELDDATA |
static java.lang.String |
IN_FLIGHT_REQUESTS |
static java.lang.String |
PARENT |
static java.lang.String |
REQUEST |
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() |
static final java.lang.String PARENT
static final java.lang.String FIELDDATA
static final java.lang.String REQUEST
static final java.lang.String IN_FLIGHT_REQUESTS
void circuitBreak(java.lang.String fieldName, long bytesNeeded)
fieldName
- name of the field responsible for tripping the breakerbytesNeeded
- bytes asked for but unable to be allocateddouble addEstimateBytesAndMaybeBreak(long bytes, java.lang.String label) throws CircuitBreakingException
bytes
- number of bytes to addlabel
- string label describing the bytes being addedCircuitBreakingException
long addWithoutBreaking(long bytes)
long getUsed()
long getLimit()
double getOverhead()
long getTrippedCount()
java.lang.String getName()