org.ow2.jasmine.monitoring.mbeancmd.audit
Class Metric
java.lang.Object
org.ow2.jasmine.monitoring.mbeancmd.audit.Metric
public class Metric
- extends java.lang.Object
- Author:
- waeselyf
A metric is a collection of attributes for a given mbean
|
Constructor Summary |
Metric(java.lang.Long t,
java.lang.String source,
javax.management.ObjectName name,
javax.management.AttributeList attl)
|
|
Method Summary |
static Metric |
delta(Metric current,
Metric baseline,
java.lang.String attr)
Computes the difference between a current and a baseline metric attribute
If attr is absent in current, or is not numeric, the value is null. |
javax.management.Attribute |
getAttribute(java.lang.String name)
Retrieve the attribute of name name |
javax.management.AttributeList |
getAttributes()
|
javax.management.ObjectName |
getName()
|
java.lang.String |
getRadical()
|
java.lang.String |
getSource()
|
long |
getTimestamp()
|
static Metric |
newInstance(java.lang.String radical)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Metric
public Metric(java.lang.Long t,
java.lang.String source,
javax.management.ObjectName name,
javax.management.AttributeList attl)
getAttribute
public javax.management.Attribute getAttribute(java.lang.String name)
- Retrieve the attribute of name name
- Parameters:
name -
- Returns:
- the attribute of name name, or null if it does not exist in the metric
getAttributes
public javax.management.AttributeList getAttributes()
- Returns:
- the list of attributes in the metric
getName
public javax.management.ObjectName getName()
- Returns:
- the name
getSource
public java.lang.String getSource()
- Returns:
- the source
getTimestamp
public long getTimestamp()
- Returns:
- the timestamp
getRadical
public java.lang.String getRadical()
- Returns:
- radical
delta
public static Metric delta(Metric current,
Metric baseline,
java.lang.String attr)
- Computes the difference between a current and a baseline metric attribute
If attr is absent in current, or is not numeric, the value is null.
If attr is present in current but not in baseline, returns the value of attr
- Parameters:
current - current metricbaseline - baseline metricattr - the attribute
- Returns:
- the difference of attr between current and baseline. A double value.
newInstance
public static Metric newInstance(java.lang.String radical)
throws InvalidMetricRadical
- Parameters:
radical -
- Returns:
-
- Throws:
InvalidMetricRadical
java.lang.Exception
Copyright © 2009 OW2 Consortium. All Rights Reserved.