org.arm4.arm40.metric
Class ArmMetricGroup
java.lang.Object
org.arm4.arm40.transaction.ArmInterface
org.arm4.arm40.metric.ArmMetricGroup
- All Implemented Interfaces:
- ArmMetricGroup, ArmInterface
public class ArmMetricGroup
- extends ArmInterface
- implements ArmMetricGroup
ArmMetricGroup is used to bind objects that implement a subclass of ArmMetric
to an ArmTransactionWithMetrics or ArmTranReportWithMetrics object.
Instances of ArmMetricGroup are created using the newArmMetricGroup() method
of ArmMetricFactory.
- Version:
- $Revision$ $Date$
- Author:
- dcarter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_metrics
protected ArmMetric[] m_metrics
m_metricValid
protected boolean[] m_metricValid
m_definition
protected ArmMetricGroupDefinition m_definition
ArmMetricGroup
public ArmMetricGroup(ArmMetricGroupDefinition groupDefinition,
ArmMetric[] metric_instances)
- Create ARM Metric Group.
- Parameters:
groupDefinition
- metric_instances
-
getDefinition
public ArmMetricGroupDefinition getDefinition()
- Specified by:
getDefinition
in interface ArmMetricGroup
- Returns:
- the metric group definition used to create this object.
getMetric
public ArmMetric getMetric(int index)
- Specified by:
getMetric
in interface ArmMetricGroup
- Parameters:
index
- the index into the ArmMetric
array. See
comment in the interface description above.
- Returns:
- the metric at the array index. This value may be null.
isMetricValid
public boolean isMetricValid(int index)
- Specified by:
isMetricValid
in interface ArmMetricGroup
- Parameters:
index
- the index into the ArmMetric
array. See
comment in the interface description above.
- Returns:
- whether an ArmMetric subclass at this array index is valid.
setMetricValid
public int setMetricValid(int index,
boolean value)
- Description copied from interface:
ArmMetricGroup
- Indicates whether an
ArmMetric
subclass at this array
index is valid.
This applies when any of the following calls are made:
ArmTranReportWithMetrics: report()
ArmTransactionWithMetrics: start(), update(),
stop()
- Specified by:
setMetricValid
in interface ArmMetricGroup
- Parameters:
index
- index the index into the ArmMetric
array. See
comment in the interface description above.value
- If the valid flag is set then the metric value is
processed.
- Returns:
- 0 on sucess; otherwise, a non-zero error code is returned
(as specified in
ArmInterface
).