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
.void
setCircuitBreaker
(CircuitBreaker circuitBreaker) The passedCircuitBreaker
object is the same one that was constructed by theBreakerSettings
provided bygetCircuitBreaker(Settings)
.
-
Method Details
-
getCircuitBreaker
Each of the factory functions are passed to the configuredCircuitBreakerService
. The service then constructs aCircuitBreaker
given 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_TYPE
The `limit` and `overhead` settings will be dynamically updated in the circuit breaker service iff aBreakerSettings
object with the same name is provided at node startup. -
setCircuitBreaker
The passedCircuitBreaker
object is the same one that was constructed by theBreakerSettings
provided bygetCircuitBreaker(Settings)
. This reference should never change throughout the lifetime of the node.- Parameters:
circuitBreaker
- The constructedCircuitBreaker
object from theBreakerSettings
provided bygetCircuitBreaker(Settings)
-