public interface CircuitBreaker
Modifier and Type | Interface and Description |
---|---|
static class |
CircuitBreaker.Type |
Modifier and Type | Field and Description |
---|---|
static String |
FIELDDATA |
static String |
IN_FLIGHT_REQUESTS |
static String |
PARENT |
static String |
REQUEST |
Modifier and Type | Method and Description |
---|---|
double |
addEstimateBytesAndMaybeBreak(long bytes,
String label)
add bytes to the breaker and maybe trip
|
long |
addWithoutBreaking(long bytes)
Adjust the circuit breaker without tripping
|
void |
circuitBreak(String fieldName,
long bytesNeeded)
Trip the circuit breaker
|
long |
getLimit() |
String |
getName() |
double |
getOverhead() |
long |
getTrippedCount() |
long |
getUsed() |
static final String PARENT
static final String FIELDDATA
static final String REQUEST
static final String IN_FLIGHT_REQUESTS
void circuitBreak(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, 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()
String getName()
Copyright © 2009–2016. All rights reserved.