Class HierarchyCircuitBreakerService
java.lang.Object
org.elasticsearch.common.component.AbstractLifecycleComponent
org.elasticsearch.indices.breaker.CircuitBreakerService
org.elasticsearch.indices.breaker.HierarchyCircuitBreakerService
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,LifecycleComponent
,Releasable
public class HierarchyCircuitBreakerService extends CircuitBreakerService
CircuitBreakerService that attempts to redistribute space between breakers
if tripped
-
Field Summary
-
Constructor Summary
Constructors Constructor Description HierarchyCircuitBreakerService(Settings settings, ClusterSettings clusterSettings)
-
Method Summary
Modifier and Type Method Description void
checkParentLimit(long newBytesReserved, java.lang.String label)
Checks whether the parent breaker has been trippedCircuitBreaker
getBreaker(java.lang.String name)
long
getParentLimit()
void
registerBreaker(BreakerSettings breakerSettings)
Allows to register a custom circuit breaker.AllCircuitBreakerStats
stats()
CircuitBreakerStats
stats(java.lang.String name)
static void
validateSettings(BreakerSettings[] childrenSettings)
Validate that child settings are validMethods inherited from class org.elasticsearch.indices.breaker.CircuitBreakerService
doClose, doStart, doStop
Methods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
-
Field Details
-
USE_REAL_MEMORY_USAGE_SETTING
-
TOTAL_CIRCUIT_BREAKER_LIMIT_SETTING
-
FIELDDATA_CIRCUIT_BREAKER_LIMIT_SETTING
-
FIELDDATA_CIRCUIT_BREAKER_OVERHEAD_SETTING
-
FIELDDATA_CIRCUIT_BREAKER_TYPE_SETTING
-
REQUEST_CIRCUIT_BREAKER_LIMIT_SETTING
-
REQUEST_CIRCUIT_BREAKER_OVERHEAD_SETTING
-
REQUEST_CIRCUIT_BREAKER_TYPE_SETTING
-
ACCOUNTING_CIRCUIT_BREAKER_LIMIT_SETTING
-
ACCOUNTING_CIRCUIT_BREAKER_OVERHEAD_SETTING
-
ACCOUNTING_CIRCUIT_BREAKER_TYPE_SETTING
-
IN_FLIGHT_REQUESTS_CIRCUIT_BREAKER_LIMIT_SETTING
-
IN_FLIGHT_REQUESTS_CIRCUIT_BREAKER_OVERHEAD_SETTING
-
IN_FLIGHT_REQUESTS_CIRCUIT_BREAKER_TYPE_SETTING
-
-
Constructor Details
-
Method Details
-
validateSettings
public static void validateSettings(BreakerSettings[] childrenSettings) throws java.lang.IllegalStateExceptionValidate that child settings are valid- Throws:
java.lang.IllegalStateException
-
getBreaker
- Specified by:
getBreaker
in classCircuitBreakerService
- Returns:
- the breaker that can be used to register estimates against
-
stats
- Specified by:
stats
in classCircuitBreakerService
- Returns:
- stats about all breakers
-
stats
- Specified by:
stats
in classCircuitBreakerService
- Returns:
- stats about a specific breaker
-
getParentLimit
public long getParentLimit() -
checkParentLimit
public void checkParentLimit(long newBytesReserved, java.lang.String label) throws CircuitBreakingExceptionChecks whether the parent breaker has been tripped- Throws:
CircuitBreakingException
-
registerBreaker
Allows to register a custom circuit breaker. Warning: Will overwrite any existing custom breaker with the same name.- Specified by:
registerBreaker
in classCircuitBreakerService
-