public class MonitorComposite extends Monitor implements DetailData
| 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(...).
|
| Constructor and Description |
|---|
MonitorComposite(Monitor[] monitors)
Creates a new instance of MonitorComposite
|
| Modifier and Type | Method and Description |
|---|---|
Monitor |
add(double value)
This method adds a value to the monitor (and aggegates statistics on it)
|
MonitorComposite |
copy() |
void |
disable()
Disable the monitor.
|
void |
enable()
enable the monitor.
|
boolean |
exists(MonKey key)
Note this works with Local, however when it is put into the map by combining multiple MonitorComposites that have
the same key (for example on different instances) it does not currently work.
|
MonitorComposite |
filterByUnits(String units) |
double |
getActive() |
double |
getAvg() |
double |
getAvgActive()
This returns a weighted average
|
Object[][] |
getBasicData()
Get basic data (which excludes range data)
|
String[] |
getBasicHeader()
Return the header that applies to all monitors.
|
Object[][] |
getData()
Get all data including basic data as well as each element within the range
|
Date |
getDateCreated() |
Object[][] |
getDisplayData()
Get display data including 1 column for each range
|
String[] |
getDisplayHeader()
Return the header with basic data and one column for each range.
|
Collection<String> |
getDistinctUnits() |
Date |
getFirstAccess() |
String[] |
getHeader()
Return the header with basic data and columns for each field within the range.
|
double |
getHits() |
String |
getInstanceName() |
JAMonDetailValue |
getJAMonDetailRow() |
Date |
getLastAccess() |
double |
getLastValue() |
double |
getMax() |
double |
getMaxActive() |
double |
getMin() |
Monitor |
getMonitor(MonKey key) |
Monitor[] |
getMonitors() |
static MonitorComposite |
getMonitors(String[][] labels)
Pass in an array with col1=lables, and col2=units and then call methods
|
MonKey |
getMonKey()
Return the label associated with this monitor.
|
int |
getNumRows() |
Range |
getRange()
Return the Range object associated with this monitor.
|
String |
getReport()
A basic report in html format.
|
String |
getReport(int sortCol,
String sortOrder)
A basic report in html format that is sorted.
|
double |
getStdDev()
This is not a true standard deviation but a average weighted std deviation.
|
double |
getTotal() |
boolean |
hasData()
Does this have data?
|
boolean |
hasListeners() |
boolean |
isEnabled()
It just takes one of the monitors to not be enabled for the composite to be false
|
boolean |
isLocalInstance()
means is in this jvm and not data distributed from another machine
|
boolean |
isPrimary()
It just takes one of the monitors to not be primary for the composite to be false
|
void |
reset()
reset all values in the monitor to their defaults
|
void |
setActive(double value) |
void |
setActivityTracking(boolean trackActivity)
FROM frequencydistimp
|
MonitorComposite |
setDateCreated(Date dateCreated) |
void |
setFirstAccess(Date date) |
void |
setHits(double value) |
MonitorComposite |
setInstanceName(String instanceName) |
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 |
start()
Start a monitor.
|
Monitor |
stop()
Stop a monitor.
|
addListener, getAvgGlobalActive, getAvgPrimaryActive, getLabel, getListenerType, getUnits, getValue, hasListener, hasListeners, isActivityTracking, removeListener, setAccessStats, skip, toStringpublic 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 MonitorComposite(Monitor[] monitors)
public Monitor[] getMonitors()
public Collection<String> getDistinctUnits()
public MonitorComposite filterByUnits(String units)
public boolean exists(MonKey key)
key - public String getInstanceName()
public MonitorComposite setInstanceName(String instanceName)
public boolean isLocalInstance()
public static MonitorComposite getMonitors(String[][] labels)
public int getNumRows()
public String[] getBasicHeader()
public String[] getHeader()
getHeader in interface DetailDatapublic String[] getDisplayHeader()
public Object[][] getData()
getData in interface DetailDatapublic Object[][] getBasicData()
public Object[][] getDisplayData()
public String getReport()
public String getReport(int sortCol, String sortOrder)
public boolean hasData()
public void reset()
public void disable()
public void enable()
public double getAvgActive()
getAvgActive in class Monitorpublic Date getFirstAccess()
getFirstAccess in class Monitorpublic Date getDateCreated()
public MonitorComposite setDateCreated(Date dateCreated)
public MonKey getMonKey()
public Date getLastAccess()
getLastAccess in class Monitorpublic double getLastValue()
getLastValue in class Monitorpublic double getMaxActive()
getMaxActive in class Monitorpublic Range getRange()
public double getStdDev()
public boolean isEnabled()
public boolean isPrimary()
public void setFirstAccess(Date date)
setFirstAccess in class Monitorpublic void setLastAccess(Date date)
setLastAccess in class Monitorpublic void setLastValue(double value)
setLastValue in class Monitorpublic void setMaxActive(double value)
setMaxActive in class Monitorpublic void setPrimary(boolean isPrimary)
setPrimary in class Monitorpublic void setTotalActive(double value)
MonitorsetTotalActive in class Monitorpublic Monitor start()
public Monitor stop()
public Monitor add(double value)
public boolean hasListeners()
hasListeners in class Monitorpublic JAMonDetailValue getJAMonDetailRow()
getJAMonDetailRow in class Monitorpublic void setActivityTracking(boolean trackActivity)
MonitorsetActivityTracking in class Monitorpublic MonitorComposite copy()
Copyright © 2015. All rights reserved.