public abstract class AbstractCacheMonitor extends AbstractNamedMonitor<CacheStatus>
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_EVICTION_THRESHOLD
Default eviction threshold is 0.
|
static int |
DEFAULT_WARN_FREE_THRESHOLD
Default free capacity threshold is 10%.
|
logger, name| Constructor and Description |
|---|
AbstractCacheMonitor() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract CacheStatistics[] |
getStatistics() |
CacheStatus |
observe()
Observes the monitored resource and reports the status.
|
void |
setEvictionThreshold(long count)
Sets the eviction threshold count above which an error is issued.
|
void |
setWarnFreeThreshold(int percent)
Sets the percent free capacity threshold below which a warning is issued.
|
protected StatusCode |
status(CacheStatistics statistics)
Computes the status code for a given set of cache statistics.
|
getName, setNamepublic static final int DEFAULT_WARN_FREE_THRESHOLD
public static final long DEFAULT_EVICTION_THRESHOLD
public void setWarnFreeThreshold(int percent)
percent - Warning threshold percent.public void setEvictionThreshold(long count)
count - Threshold for number of cache evictions.public CacheStatus observe()
Monitorprotected abstract CacheStatistics[] getStatistics()
protected StatusCode status(CacheStatistics statistics)
statistics - Cache statistics.StatusCode.WARN if eviction count is above threshold or if
percent free space is below threshold, otherwise StatusCode.OK.Copyright © 2004-2014 Jasig. All Rights Reserved.