public abstract class Monitor extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static String |
ACTIVE |
static String |
AVG |
static String |
AVGACTIVE |
static String |
FIRSTACCESS |
static String |
HITS |
static String |
LASTACCESS |
static String |
LASTVALUE |
static String |
MAX |
static String |
MAXACTIVE |
static String |
MIN |
static String |
STDDEV |
static String |
TOTAL |
static String |
VALUE
Used in call to addListener(...).
|
Modifier and Type | Method and Description |
---|---|
Monitor |
add(double value)
This method adds a value to the monitor (and aggegates statistics on it)
|
void |
addListener(String listenerTypeName,
JAMonListener listener)
Introduced as a way to add listeners that allows for lazy initialization saving a fair amount of memory.
|
void |
disable()
Disable the monitor.
|
void |
enable()
enable the monitor.
|
double |
getActive() |
double |
getAvg() |
double |
getAvgActive() |
double |
getAvgGlobalActive()
for low numbers this can be negative
|
double |
getAvgPrimaryActive() |
Date |
getFirstAccess() |
double |
getHits() |
JAMonDetailValue |
getJAMonDetailRow() |
String |
getLabel()
Returns the label for the monitor
|
Date |
getLastAccess() |
double |
getLastValue() |
ListenerType |
getListenerType(String listenerType)
pass in a valid listener type (min, max, value, maxactive) and get the ListenerType
|
double |
getMax() |
double |
getMaxActive() |
double |
getMin() |
MonKey |
getMonKey()
Return the label associated with this monitor.
|
Range |
getRange()
Return the Range object associated with this monitor.
|
double |
getStdDev() |
double |
getTotal() |
String |
getUnits()
Returns the units for the monitor
|
Object |
getValue(String key)
Alternative method of getting the values in the 'get' methods like getHits(), getAvg() etc.
|
boolean |
hasListener(String listenerTypeName,
String listenerName)
Introduced as a way to check for listeners that allows for lazy initialization saving a fair amount of memory.
|
boolean |
hasListeners() |
boolean |
hasListeners(String listenerTypeName)
Returns true if this listenertype ('max', 'min', 'value', 'maxactive') has any listeners at all
|
boolean |
isActivityTracking() |
boolean |
isEnabled()
Is the monitor enabled.
|
boolean |
isPrimary() |
void |
removeListener(String listenerTypeName,
String listenerName)
Introduced as a way to remove listeners that allows for lazy initialization saving a fair amount of memory.
|
void |
reset()
reset all values in the monitor to their defaults
|
void |
setAccessStats(long now) |
void |
setActive(double value) |
void |
setActivityTracking(boolean trackActivity)
FROM frequencydistimp
|
void |
setFirstAccess(Date date) |
void |
setHits(double value) |
void |
setLastAccess(Date date) |
void |
setLastValue(double value) |
void |
setMax(double value) |
void |
setMaxActive(double value) |
void |
setMin(double value) |
void |
setPrimary(boolean isPrimary)
Indicate that this a primary Monitor.
|
void |
setTotal(double value) |
void |
setTotalActive(double value)
Neeed to reset this to 0.0 to remove avg active numbers
|
Monitor |
skip()
decrement counters but don't add aggregate stats to monitor.
|
Monitor |
start()
Start a monitor.
|
Monitor |
stop()
Stop a monitor.
|
String |
toString() |
public static final String VALUE
public static final String LASTVALUE
public static final String MAX
public static final String MIN
public static final String MAXACTIVE
public static final String TOTAL
public static final String AVG
public static final String HITS
public static final String STDDEV
public static final String FIRSTACCESS
public static final String LASTACCESS
public static final String ACTIVE
public static final String AVGACTIVE
public MonKey getMonKey()
public String getLabel()
public String getUnits()
public void setAccessStats(long now)
public void reset()
public double getTotal()
public void setTotal(double value)
public double getAvg()
public double getMin()
public void setMin(double value)
public double getMax()
public void setMax(double value)
public double getHits()
public void setHits(double value)
public double getStdDev()
public void setFirstAccess(Date date)
public Date getFirstAccess()
public void setLastAccess(Date date)
public Date getLastAccess()
public double getLastValue()
public void setLastValue(double value)
public void disable()
public void enable()
public boolean isEnabled()
public ListenerType getListenerType(String listenerType)
public boolean hasListeners(String listenerTypeName)
listenerTypeName
- public void addListener(String listenerTypeName, JAMonListener listener)
public boolean hasListener(String listenerTypeName, String listenerName)
public void removeListener(String listenerTypeName, String listenerName)
public Monitor start()
public Monitor skip()
public Monitor stop()
public Monitor add(double value)
public Range getRange()
public double getActive()
public void setActive(double value)
public double getMaxActive()
public void setMaxActive(double value)
public void setTotalActive(double value)
public boolean isPrimary()
public void setPrimary(boolean isPrimary)
public boolean hasListeners()
public Object getValue(String key)
public void setActivityTracking(boolean trackActivity)
public boolean isActivityTracking()
public double getAvgActive()
public double getAvgGlobalActive()
public double getAvgPrimaryActive()
public JAMonDetailValue getJAMonDetailRow()
Copyright © 2015. All rights reserved.