Package org.elasticsearch.plugins
Interface CircuitBreakerPlugin
public interface CircuitBreakerPlugin
An extension point for
Plugin implementations to add custom circuit breakers-
Method Summary
Modifier and TypeMethodDescriptiongetCircuitBreaker(Settings settings)Each of the factory functions are passed to the configuredCircuitBreakerService.voidsetCircuitBreaker(CircuitBreaker circuitBreaker)The passedCircuitBreakerobject is the same one that was constructed by theBreakerSettingsprovided bygetCircuitBreaker(Settings).
-
Method Details
-
getCircuitBreaker
Each of the factory functions are passed to the configuredCircuitBreakerService. The service then constructs aCircuitBreakergiven the resultingBreakerSettings. Custom circuit breakers settings can be found inBreakerSettings. See: - limit (example: `breaker.foo.limit`)BreakerSettings.CIRCUIT_BREAKER_LIMIT_SETTING- overhead (example: `breaker.foo.overhead`)BreakerSettings.CIRCUIT_BREAKER_OVERHEAD_SETTING- type (example: `breaker.foo.type`)BreakerSettings.CIRCUIT_BREAKER_TYPEThe `limit` and `overhead` settings will be dynamically updated in the circuit breaker service iff aBreakerSettingsobject with the same name is provided at node startup. -
setCircuitBreaker
The passedCircuitBreakerobject is the same one that was constructed by theBreakerSettingsprovided bygetCircuitBreaker(Settings). This reference should never change throughout the lifetime of the node.- Parameters:
circuitBreaker- The constructedCircuitBreakerobject from theBreakerSettingsprovided bygetCircuitBreaker(Settings)
-