|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Metrics container interface. Numeric metrics for the server are kept in this container.
| Fields inherited from interface jrunx.kernel.Service |
INITIALIZED, STARTED, STARTING, STOPPED, STOPPING, UNINITIALIZED |
| Fields inherited from interface jrunx.metrics.MetricsConstants |
METRICS_BUSY_TH, METRICS_DELAY_MS, METRICS_DELAY_RQ, METRICS_DELAY_TH, METRICS_DROPPED_RQ, METRICS_FREE_MEMORY, METRICS_IDLE_TH, METRICS_LISTEN_TH, METRICS_TOTAL_MEMORY, METRICS_TOTAL_TH |
| Method Summary | |
int |
createMetric(java.lang.String name)
create a metric with the given name |
int |
createMetric(java.lang.String name,
boolean reset)
create a metric with the given name. |
java.util.Properties |
createProperties(int[] values)
Create a Properties object with the metrics name as the key and the given values as the corresponding element. |
void |
deleteMetric(java.lang.String name)
remove a metric by name |
int[] |
exchangeMetrics(int[] values)
swap metrics arrays atomically. |
int |
findMetric(java.lang.String name)
look up a metric by name |
int |
getMetric(int index)
obtain the value of a metric |
int[] |
getSnapshot()
Take a snapshot of the current metrics. |
int[] |
getSnapshot(boolean reset)
Take a snapshot of the current metrics. |
java.util.Vector |
getSnapshotHistory()
Returns the snapshot history. |
long |
getSnapshotTime()
Returns the timestamp of the last snapshot. |
boolean |
isReset(java.lang.String name)
Determine if the metric should be reset when a snapshot is taken |
void |
setMetric(int index,
int value)
change the value of a metric |
int |
updateMetric(int index,
int delta)
update the value of a metric by adding the given delta value in an atomic operation. |
| Methods inherited from interface jrunx.metrics.MetricsServiceMBean |
getHistorySize, getInitialSize, getMetricsService, setHistorySize, setInitialSize |
| Methods inherited from interface jrunx.kernel.ServiceMBean |
bind, getBindToJNDI, getDeactivated, getDomainName, getJRunService, getLogger, getName, getParentService, getServerName, requestServer, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, unbind |
| Methods inherited from interface jrunx.kernel.Service |
destroy, getStatus, init, start, stop, updateStatus |
| Method Detail |
public int createMetric(java.lang.String name)
the - name of the metric
public int createMetric(java.lang.String name,
boolean reset)
name - the name of the metricreset - true if the value should be reset after logging
public void setMetric(int index,
int value)
index - metric to be updatedvalue - the new valuepublic int getMetric(int index)
index - metric to be fetched
public int updateMetric(int index,
int delta)
index - the metric indexpublic int findMetric(java.lang.String name)
the - namepublic void deleteMetric(java.lang.String name)
name - String name of the metric to be deletedpublic int[] exchangeMetrics(int[] values)
values - an old buffer to installpublic int[] getSnapshot()
public int[] getSnapshot(boolean reset)
reset - true if the metrics should be resetpublic long getSnapshotTime()
public java.util.Vector getSnapshotHistory()
public java.util.Properties createProperties(int[] values)
The - valuespublic boolean isReset(java.lang.String name)
name - The metric name
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||