public abstract class AbstractThresholdListener extends AbstractStatsCollectionListener
addThresholdListener method. When the threshold
event occurs, that object's appropriate method is invoked.| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_THRESHOLD
The Constant DEFAULT_THRESHOLD.
|
static long |
DEFAULT_VALUE
The Constant DEFAULT_VALUE.
|
logger| Constructor and Description |
|---|
AbstractThresholdListener() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
crossedAboveThreshold(StatsCollectionEvent sce)
Crossed above threshold.
|
protected abstract void |
crossedBelowThreshold(StatsCollectionEvent sce)
Crossed below threshold.
|
protected long |
getPreviousValue(String name)
Gets the previous value.
|
protected long |
getThreshold(String name)
Gets the threshold.
|
protected boolean |
isPreviousValueAboveThreshold(StatsCollectionEvent sce)
Checks if is previous value above threshold.
|
protected boolean |
isSeriesDisabled(String name)
Checks if is series disabled.
|
protected boolean |
isValueAboveThreshold(StatsCollectionEvent sce)
Checks if is value above threshold.
|
protected abstract void |
remainedAboveThreshold(StatsCollectionEvent sce)
Remained above threshold.
|
protected abstract void |
remainedBelowThreshold(StatsCollectionEvent sce)
Remained below threshold.
|
void |
reset()
Reset.
|
protected void |
setPreviousValue(String name,
long previousValue)
Sets the previous value.
|
protected void |
setSeriesDisabled(String name,
boolean disabled)
Sets the series disabled.
|
void |
statsCollected(StatsCollectionEvent sce)
Stats collected.
|
getPropertyCategory, getPropertyKey, getPropertyValue, getPropertyValue, isEnabled, setEnabled, setPropertyCategorypublic static final long DEFAULT_THRESHOLD
public static final long DEFAULT_VALUE
protected abstract void crossedAboveThreshold(StatsCollectionEvent sce)
sce - the sceprotected abstract void crossedBelowThreshold(StatsCollectionEvent sce)
sce - the sceprotected abstract void remainedAboveThreshold(StatsCollectionEvent sce)
sce - the sceprotected abstract void remainedBelowThreshold(StatsCollectionEvent sce)
sce - the scepublic void statsCollected(StatsCollectionEvent sce)
StatsCollectionListenersce - the scepublic void reset()
AbstractStatsCollectionListenerreset in class AbstractStatsCollectionListenerprotected boolean isPreviousValueAboveThreshold(StatsCollectionEvent sce)
sce - the sceprotected boolean isValueAboveThreshold(StatsCollectionEvent sce)
sce - the sceprotected long getThreshold(String name)
name - the nameprotected long getPreviousValue(String name)
name - the nameprotected void setPreviousValue(String name, long previousValue)
name - the namepreviousValue - the previous valueprotected boolean isSeriesDisabled(String name)
name - the nameprotected void setSeriesDisabled(String name, boolean disabled)
name - the namedisabled - the disabledCopyright © 2009–2020 psi-probe. All rights reserved.