Package org.apache.storm.metric.api
Interface IMetric
- All Known Subinterfaces:
- IShellMetric
- All Known Implementing Classes:
- AssignableMetric,- AssignableShellMetric,- CGroupCpu,- CGroupCpuGuarantee,- CGroupCpuGuaranteeByCfsQuota,- CGroupMemoryLimit,- CGroupMemoryUsage,- CGroupMetricsBase,- CombinedMetric,- CombinedShellMetric,- CountMetric,- CountShellMetric,- CPUMetric,- DeserializingConnectionCallback,- HistogramMetric,- MultiCountMetric,- MultiReducedMetric,- ReducedMetric,- ReducedShellMetric,- StateMetric
public interface IMetric
Produces metrics.
 Usually, metric is a measurement identified by a name string.
 Dimensions are a collection of additional key-value metadata map containing extra information of this measurement.
 It is optional when customizing your metric by implementing this interface
- 
Method SummaryModifier and TypeMethodDescriptionGet dimension map.Get value and reset.
- 
Method Details- 
getValueAndResetObject getValueAndReset()Get value and reset.- 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.
 
- 
getDimensionsGet dimension map. An empty map will be returned if metric is not dimensional.- Returns:
- a K-V map of the additional metadata.
 
 
-