Package org.apache.storm.metric.api
Class AssignableMetric
- java.lang.Object
-
- org.apache.storm.metric.api.AssignableMetric
-
- All Implemented Interfaces:
IMetric
- Direct Known Subclasses:
AssignableShellMetric
public class AssignableMetric extends Object implements IMetric
-
-
Constructor Summary
Constructors Constructor Description AssignableMetric(Object value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetValueAndReset()Get value and reset.voidsetValue(Object value)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.storm.metric.api.IMetric
getDimensions
-
-
-
-
Constructor Detail
-
AssignableMetric
public AssignableMetric(Object value)
-
-
Method Detail
-
setValue
public void setValue(Object value)
-
getValueAndReset
public Object getValueAndReset()
Description copied from interface:IMetricGet value and reset.- Specified by:
getValueAndResetin interfaceIMetric- Returns:
- an object that will be sent to
IMetricsConsumer.handleDataPoints(org.apache.storm.metric.api.IMetricsConsumer.TaskInfo, java.util.Collection). Ifnullis returned nothing will be sent. If this value can be reset, like with a counter, a side effect of calling this should be that the value is reset.
-
-