Package org.apache.storm.metrics2

## Class StormMetricRegistry

- java.lang.Object
- - org.apache.storm.metrics2.StormMetricRegistry

- All Implemented Interfaces:
    `MetricRegistryProvider`

      public class StormMetricRegistry
      extends Object
      implements MetricRegistryProvider

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `StormMetricRegistry()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `com.codahale.metrics.Counter` | `counter​(String name, String componentId, Integer taskId)` |
    `com.codahale.metrics.Counter` | `counter​(String name, String topologyId, String componentId, Integer taskId, Integer workerPort, String streamId)` |
    `com.codahale.metrics.Counter` | `counter​(String name, TopologyContext context)` |
    `com.codahale.metrics.Counter` | `counter​(String name, WorkerTopologyContext context, String componentId, Integer taskId, String streamId)` |
    `void` | `deregister​(Set<com.codahale.metrics.Metric> toRemove)` |
    `<T> com.codahale.metrics.Gauge<T>` | `gauge​(String name, com.codahale.metrics.Gauge<T> gauge, String componentId, Integer taskId)` |
    `<T> com.codahale.metrics.Gauge<T>` | `gauge​(String name, com.codahale.metrics.Gauge<T> gauge, String topologyId, String componentId, Integer taskId, Integer port)` | Deprecated.
    `<T> com.codahale.metrics.Gauge<T>` | `gauge​(String name, com.codahale.metrics.Gauge<T> gauge, String topologyId, String componentId, String streamId, Integer taskId, Integer port)` |
    `<T> com.codahale.metrics.Gauge<T>` | `gauge​(String name, com.codahale.metrics.Gauge<T> gauge, TopologyContext context)` |
    `<T> SimpleGauge<T>` | `gauge​(T initialValue, String name, String topologyId, String componentId, Integer taskId, Integer port)` |
    `int` | `getRateCounterUpdateIntervalSeconds()` |
    `com.codahale.metrics.MetricRegistry` | `getRegistry()` |
    `Map<String,​com.codahale.metrics.Counter>` | `getTaskCounters​(int taskId)` |
    `Map<String,​com.codahale.metrics.Gauge>` | `getTaskGauges​(int taskId)` |
    `Map<String,​com.codahale.metrics.Histogram>` | `getTaskHistograms​(int taskId)` |
    `Map<String,​com.codahale.metrics.Meter>` | `getTaskMeters​(int taskId)` |
    `Map<TaskMetricDimensions,​TaskMetricRepo>` | `getTaskMetrics()` |
    `Map<String,​com.codahale.metrics.Timer>` | `getTaskTimers​(int taskId)` |
    `com.codahale.metrics.Histogram` | `histogram​(String name, TopologyContext context)` |
    `com.codahale.metrics.Meter` | `meter​(String name, TopologyContext context)` |
    `com.codahale.metrics.Meter` | `meter​(String name, WorkerTopologyContext context, String componentId, Integer taskId)` |
    `com.codahale.metrics.Meter` | `meter​(String name, WorkerTopologyContext context, String componentId, Integer taskId, String streamId)` |
    `void` | `metricSet​(String prefix, com.codahale.metrics.MetricSet set, TopologyContext context)` |
    `RateCounter` | `rateCounter​(String metricName, String componentId, int taskId)` |
    `RateCounter` | `rateCounter​(String metricName, String topologyId, String componentId, int taskId, int workerPort, String streamId)` |
    `void` | `start​(Map<String,​Object> topoConf, int port)` |
    `void` | `stop()` |
    `com.codahale.metrics.Timer` | `timer​(String name, TopologyContext context)` |

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

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

- - ### Constructor Detail

    - #### StormMetricRegistry

          public StormMetricRegistry()

  - ### Method Detail

    - #### rateCounter

          public RateCounter rateCounter​(String metricName,
                                         String topologyId,
                                         String componentId,
                                         int taskId,
                                         int workerPort,
                                         String streamId)

    - #### rateCounter

          public RateCounter rateCounter​(String metricName,
                                         String componentId,
                                         int taskId)

    - #### gauge

          public <T> SimpleGauge<T> gauge​(T initialValue,
                                          String name,
                                          String topologyId,
                                          String componentId,
                                          Integer taskId,
                                          Integer port)

    - #### gauge

          public <T> com.codahale.metrics.Gauge<T> gauge​(String name,
                                                         com.codahale.metrics.Gauge<T> gauge,
                                                         TopologyContext context)

    - #### gauge

          @Deprecated
          public <T> com.codahale.metrics.Gauge<T> gauge​(String name,
                                                         com.codahale.metrics.Gauge<T> gauge,
                                                         String topologyId,
                                                         String componentId,
                                                         Integer taskId,
                                                         Integer port)

      Deprecated.

    - #### gauge

          public <T> com.codahale.metrics.Gauge<T> gauge​(String name,
                                                         com.codahale.metrics.Gauge<T> gauge,
                                                         String componentId,
                                                         Integer taskId)

    - #### gauge

          public <T> com.codahale.metrics.Gauge<T> gauge​(String name,
                                                         com.codahale.metrics.Gauge<T> gauge,
                                                         String topologyId,
                                                         String componentId,
                                                         String streamId,
                                                         Integer taskId,
                                                         Integer port)

    - #### meter

          public com.codahale.metrics.Meter meter​(String name,
                                                  WorkerTopologyContext context,
                                                  String componentId,
                                                  Integer taskId,
                                                  String streamId)

    - #### meter

          public com.codahale.metrics.Meter meter​(String name,
                                                  WorkerTopologyContext context,
                                                  String componentId,
                                                  Integer taskId)

    - #### meter

          public com.codahale.metrics.Meter meter​(String name,
                                                  TopologyContext context)

    - #### counter

          public com.codahale.metrics.Counter counter​(String name,
                                                      WorkerTopologyContext context,
                                                      String componentId,
                                                      Integer taskId,
                                                      String streamId)

    - #### counter

          public com.codahale.metrics.Counter counter​(String name,
                                                      String topologyId,
                                                      String componentId,
                                                      Integer taskId,
                                                      Integer workerPort,
                                                      String streamId)

    - #### counter

          public com.codahale.metrics.Counter counter​(String name,
                                                      TopologyContext context)

    - #### counter

          public com.codahale.metrics.Counter counter​(String name,
                                                      String componentId,
                                                      Integer taskId)

    - #### timer

          public com.codahale.metrics.Timer timer​(String name,
                                                  TopologyContext context)

    - #### histogram

          public com.codahale.metrics.Histogram histogram​(String name,
                                                          TopologyContext context)

    - #### metricSet

          public void metricSet​(String prefix,
                                com.codahale.metrics.MetricSet set,
                                TopologyContext context)

    - #### deregister

          public void deregister​(Set<com.codahale.metrics.Metric> toRemove)

    - #### getTaskGauges

          public Map<String,​com.codahale.metrics.Gauge> getTaskGauges​(int taskId)

    - #### getTaskCounters

          public Map<String,​com.codahale.metrics.Counter> getTaskCounters​(int taskId)

    - #### getTaskHistograms

          public Map<String,​com.codahale.metrics.Histogram> getTaskHistograms​(int taskId)

    - #### getTaskMeters

          public Map<String,​com.codahale.metrics.Meter> getTaskMeters​(int taskId)

    - #### getTaskTimers

          public Map<String,​com.codahale.metrics.Timer> getTaskTimers​(int taskId)

    - #### start

          public void start​(Map<String,​Object> topoConf,
                            int port)

    - #### stop

          public void stop()

    - #### getRateCounterUpdateIntervalSeconds

          public int getRateCounterUpdateIntervalSeconds()

    - #### getRegistry

          public com.codahale.metrics.MetricRegistry getRegistry()

      Specified by:
        `getRegistry` in interface `MetricRegistryProvider`

    - #### getTaskMetrics

          public Map<TaskMetricDimensions,​TaskMetricRepo> getTaskMetrics()

      Specified by:
        `getTaskMetrics` in interface `MetricRegistryProvider`