Package cz.o2.proxima.core.metrics
Class TimeAveragingMetric
- java.lang.Object
-
- cz.o2.proxima.core.metrics.Metric<java.lang.Double>
-
- cz.o2.proxima.core.metrics.ScalarMetric
-
- cz.o2.proxima.core.metrics.TimeAveragingMetric
-
- All Implemented Interfaces:
ScalarMetricMBean<java.lang.Double>
,java.io.Serializable
@Stable public class TimeAveragingMetric extends ScalarMetric
Metric calculating average per time window.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Double
getValue()
Retrieve current value of the metric.void
increment(double d)
Increment the metric by given double value.void
reset()
Reset the metric to initial state.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cz.o2.proxima.core.metrics.ScalarMetricMBean
getGroup, getName
-
-
-
-
Method Detail
-
increment
public void increment(double d)
Description copied from class:Metric
Increment the metric by given double value.
-
getValue
public java.lang.Double getValue()
Description copied from class:Metric
Retrieve current value of the metric.- Specified by:
getValue
in interfaceScalarMetricMBean<java.lang.Double>
- Specified by:
getValue
in classMetric<java.lang.Double>
- Returns:
- current value
-
-