org.apache.storm.metric.api

## Class MultiReducedMetric

- java.lang.Object
- - org.apache.storm.metric.api.MultiReducedMetric

- All Implemented Interfaces:
    IMetric

      public class MultiReducedMetric
      extends Object
      implements IMetric

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MultiReducedMetric(IReducer reducer)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<String,Object>` | `getValueAndReset()` Get value and reset.
    `ReducedMetric` | `scope(String key)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MultiReducedMetric

          public MultiReducedMetric(IReducer reducer)

  - ### Method Detail

    - #### scope

          public ReducedMetric scope(String key)

    - #### getValueAndReset

          public Map<String,Object> getValueAndReset()

      Description copied from interface: `IMetric`

      Get value and reset.

      Specified by:
        `getValueAndReset` in interface `IMetric`
      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.