org.apache.storm.trident.operation

## Class TridentOperationContext

- java.lang.Object
- - org.apache.storm.trident.operation.TridentOperationContext

- All Implemented Interfaces:
    IMetricsContext

      public class TridentOperationContext
      extends Object
      implements IMetricsContext

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TridentOperationContext(TopologyContext topoContext, TridentTuple.Factory factory)`
    `TridentOperationContext(TridentOperationContext parent, TridentTuple.Factory factory)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getPartitionIndex()`
    `TridentTupleView.ProjectionFactory` | `makeProjectionFactory(Fields fields)`
    `int` | `numPartitions()`
    `com.codahale.metrics.Counter` | `registerCounter(String name)`
    `<T> com.codahale.metrics.Gauge<T>` | `registerGauge(String name, com.codahale.metrics.Gauge<T> gauge)`
    `com.codahale.metrics.Histogram` | `registerHistogram(String name)`
    `com.codahale.metrics.Meter` | `registerMeter(String name)`
    `CombinedMetric` | `registerMetric(String name, ICombiner combiner, int timeBucketSizeInSecs)` Register metric.
    `ReducedMetric` | `registerMetric(String name, IReducer reducer, int timeBucketSizeInSecs)` Register metric.
    `<T extends IMetric> T` | `registerMetric(String name, T metric, int timeBucketSizeInSecs)` Register metric.
    `void` | `registerMetricSet(String prefix, com.codahale.metrics.MetricSet set)`
    `com.codahale.metrics.Timer` | `registerTimer(String name)`

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

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

- - ### Constructor Detail

    - #### TridentOperationContext

          public TridentOperationContext(TopologyContext topoContext,
                                         TridentTuple.Factory factory)

    - #### TridentOperationContext

          public TridentOperationContext(TridentOperationContext parent,
                                         TridentTuple.Factory factory)

  - ### Method Detail

    - #### makeProjectionFactory

          public TridentTupleView.ProjectionFactory makeProjectionFactory(Fields fields)

    - #### numPartitions

          public int numPartitions()

    - #### getPartitionIndex

          public int getPartitionIndex()

    - #### registerMetric

          public <T extends IMetric> T registerMetric(String name,
                                                      T metric,
                                                      int timeBucketSizeInSecs)

      Description copied from interface: `IMetricsContext`

      Register metric.

      Specified by:
        `registerMetric` in interface `IMetricsContext`

    - #### registerMetric

          public ReducedMetric registerMetric(String name,
                                              IReducer reducer,
                                              int timeBucketSizeInSecs)

      Description copied from interface: `IMetricsContext`

      Register metric.

      Specified by:
        `registerMetric` in interface `IMetricsContext`

    - #### registerMetric

          public CombinedMetric registerMetric(String name,
                                               ICombiner combiner,
                                               int timeBucketSizeInSecs)

      Description copied from interface: `IMetricsContext`

      Register metric.

      Specified by:
        `registerMetric` in interface `IMetricsContext`

    - #### registerTimer

          public com.codahale.metrics.Timer registerTimer(String name)

      Specified by:
        `registerTimer` in interface `IMetricsContext`

    - #### registerHistogram

          public com.codahale.metrics.Histogram registerHistogram(String name)

      Specified by:
        `registerHistogram` in interface `IMetricsContext`

    - #### registerMeter

          public com.codahale.metrics.Meter registerMeter(String name)

      Specified by:
        `registerMeter` in interface `IMetricsContext`

    - #### registerCounter

          public com.codahale.metrics.Counter registerCounter(String name)

      Specified by:
        `registerCounter` in interface `IMetricsContext`

    - #### registerGauge

          public <T> com.codahale.metrics.Gauge<T> registerGauge(String name,
                                                                 com.codahale.metrics.Gauge<T> gauge)

      Specified by:
        `registerGauge` in interface `IMetricsContext`

    - #### registerMetricSet

          public void registerMetricSet(String prefix,
                                        com.codahale.metrics.MetricSet set)

      Specified by:
        `registerMetricSet` in interface `IMetricsContext`

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