public class MemoryCircuitBreaker extends CircuitBreaker
Tracks the current JVM heap usage and triggers if it exceeds the defined percentage of the maximum heap size allocated to the JVM. This circuit breaker is a part of the default CircuitBreakerManager so is checked for every request -- hence it is realtime. Once the memory usage goes below the threshold, it will start allowing queries again.
The memory threshold is defined as a percentage of the maximum memory allocated -- see memoryCircuitBreakerThresholdPct in solrconfig.xml.
CircuitBreaker.CircuitBreakerConfigconfig, NAME| Constructor and Description |
|---|
MemoryCircuitBreaker(CircuitBreaker.CircuitBreakerConfig config) |
| Modifier and Type | Method and Description |
|---|---|
protected long |
calculateLiveMemoryUsage()
Calculate the live memory usage for the system.
|
String |
getDebugInfo()
Get debug useful info.
|
String |
getErrorMessage()
Get error message when the circuit breaker triggers
|
boolean |
isTripped()
Check if circuit breaker is tripped.
|
isEnabledpublic MemoryCircuitBreaker(CircuitBreaker.CircuitBreakerConfig config)
public boolean isTripped()
CircuitBreakerisTripped in class CircuitBreakerpublic String getDebugInfo()
CircuitBreakergetDebugInfo in class CircuitBreakerpublic String getErrorMessage()
CircuitBreakergetErrorMessage in class CircuitBreakerprotected long calculateLiveMemoryUsage()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.