Class LoadAverageCircuitBreaker
java.lang.Object
org.apache.solr.util.circuitbreaker.CircuitBreaker
org.apache.solr.util.circuitbreaker.LoadAverageCircuitBreaker
- All Implemented Interfaces:
Closeable,AutoCloseable,NamedListInitializedPlugin
Tracks current system load average and triggers if the specified threshold is breached.
This circuit breaker gets the load average (length of the run queue) over the last minute and uses that data to take a decision. We depend on OperatingSystemMXBean which does not allow a configurable interval of collection of data.
This Circuit breaker is dependent on the operating system, and may typically not work on Microsoft Windows.
-
Field Summary
Fields inherited from class org.apache.solr.util.circuitbreaker.CircuitBreaker
SYSPROP_SOLR_CIRCUITBREAKER_ERRORCODE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected doubleGet error message when the circuit breaker triggersdoublebooleanCheck if circuit breaker is tripped.setThreshold(double thresholdValueUnbounded) toString()Methods inherited from class org.apache.solr.util.circuitbreaker.CircuitBreaker
close, getExceptionErrorCode, getRequestTypes, init, isWarnOnly, setRequestTypes, setWarnOnly
-
Constructor Details
-
LoadAverageCircuitBreaker
public LoadAverageCircuitBreaker()
-
-
Method Details
-
isTripped
public boolean isTripped()Description copied from class:CircuitBreakerCheck if circuit breaker is tripped.- Specified by:
isTrippedin classCircuitBreaker
-
getErrorMessage
Description copied from class:CircuitBreakerGet error message when the circuit breaker triggers- Specified by:
getErrorMessagein classCircuitBreaker
-
setThreshold
-
getLoadAverageThreshold
public double getLoadAverageThreshold() -
calculateLiveLoadAverage
protected double calculateLiveLoadAverage() -
toString
-