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, KafkaOffsetMetric, MultiCountMetric, MultiReducedMetric, ReducedMetric, ReducedShellMetric, StateMetric

      public interface IMetric

  Produces metrics.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `getValueAndReset()` Get value and reset.

- - ### Method Detail

    - #### getValueAndReset

          Object getValueAndReset()

      Get value and reset.

      Returns:
        an object that will be sent sent to `IMetricsConsumer#handleDataPoints(org.apache.storm.metric.api.IMetricsConsumer .TaskInfo, java.util.Collection)`. If null is 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.

Copyright © 2021 The Apache Software Foundation. All rights reserved.