Class MemoryHealthIndicator
java.lang.Object
com.kingsrook.qqq.middleware.health.indicators.MemoryHealthIndicator
- All Implemented Interfaces:
HealthIndicator
Health indicator that checks JVM memory usage.
This indicator:
- Checks heap memory usage percentage
- Returns UP if below threshold
- Returns DEGRADED if above threshold (but not critical)
- Configurable threshold (default 90%)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExecute the memory health checkgetName()Get the name of this health indicatorGetter for thresholdPercentvoidsetThresholdPercent(Integer thresholdPercent) Setter for thresholdPercentwithThreshold(Integer thresholdPercent) Fluent setter for thresholdPercent
-
Constructor Details
-
MemoryHealthIndicator
public MemoryHealthIndicator()Constructor
-
-
Method Details
-
getName
Get the name of this health indicator- Specified by:
getNamein interfaceHealthIndicator- Returns:
- indicator name (e.g., "database", "memory", "diskSpace")
-
check
Execute the memory health check- Specified by:
checkin interfaceHealthIndicator- Parameters:
qInstance- the QInstance for accessing backends, configuration, etc.- Returns:
- health check result with status and details
- Throws:
QException- if the check fails catastrophically
-
withThreshold
Fluent setter for thresholdPercent -
getThresholdPercent
Getter for thresholdPercent -
setThresholdPercent
Setter for thresholdPercent
-