org.ow2.jasmine.monitoring.mbeancmd.audit
Class Metric
java.lang.Object
org.ow2.jasmine.monitoring.mbeancmd.audit.Metric
public class Metric
- extends Object
- Author:
- waeselyf
A metric is a collection of attributes for a given mbean
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Metric
public Metric(Long t,
String source,
ObjectName name,
AttributeList attl)
getAttribute
public Attribute getAttribute(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 AttributeList getAttributes()
- Returns:
- the list of attributes in the metric
getName
public ObjectName getName()
- Returns:
- the name
getSource
public String getSource()
- Returns:
- the source
getTimestamp
public long getTimestamp()
- Returns:
- the timestamp
getRadical
public String getRadical()
- Returns:
- radical
delta
public static Metric delta(Metric current,
Metric baseline,
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(String radical)
throws InvalidMetricRadical
- Parameters:
radical -
- Returns:
-
- Throws:
InvalidMetricRadical
Exception
Copyright © 2012 OW2 Consortium. All Rights Reserved.