Package org.apache.storm.metric.internal

## Class MultiCountStat<T>

- java.lang.Object
- - org.apache.storm.metric.internal.MultiCountStat<T>

-     public class MultiCountStat<T>
      extends Object

  Acts as a MultiCount Stat, but keeps track of approximate counts for the last 10 mins, 3 hours, 1 day, and all time. for the same keys

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static int` | `TEN_MIN_IN_SECONDS` |
    `static String` | `TEN_MIN_IN_SECONDS_STR` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `MultiCountStat​(int numBuckets)` | Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `close()` |
    `Map<String,​Map<T,​Long>>` | `getTimeCounts()` |
    `void` | `incBy​(T key, long count)` | Increase the count by the given value.
    `protected String` | `keyToString​(T key)` |

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

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

- - ### Field Detail

    - #### TEN_MIN_IN_SECONDS

          public static final int TEN_MIN_IN_SECONDS

      See Also:
        Constant Field Values

    - #### TEN_MIN_IN_SECONDS_STR

          public static final String TEN_MIN_IN_SECONDS_STR

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MultiCountStat

          public MultiCountStat​(int numBuckets)

      Constructor.
      Parameters:
        `numBuckets` - the number of buckets to divide the time periods into.

  - ### Method Detail

    - #### incBy

          public void incBy​(T key,
                            long count)

      Increase the count by the given value.
      Parameters:
        `count` - number to count

    - #### keyToString

          protected String keyToString​(T key)

    - #### getTimeCounts

          public Map<String,​Map<T,​Long>> getTimeCounts()

    - #### close

          public void close()