com.amazonaws.services.kinesis.metrics.impl

Class AccumulatingMetricsScope<KeyType>

  • Type Parameters:
    KeyType - can be a class or object defined by the user that stores information about a MetricDatum needed by the user. The following is a example of what a KeyType class might look like: class SampleKeyType { private long timeKeyCreated; private MetricDatum datum; public SampleKeyType(long timeKeyCreated, MetricDatum datum){ this.timeKeyCreated = timeKeyCreated; this.datum = datum; } }
    All Implemented Interfaces:
    IMetricsScope
    Direct Known Subclasses:
    AccumulateByNameMetricsScope


    public abstract class AccumulatingMetricsScope<KeyType>extends EndingMetricsScope
    An IMetricsScope that accumulates data from multiple calls to addData with the same name parameter. It tracks min, max, sample count, and sum for each named metric.
    • Field Detail

      • data

        protected Map<KeyType,com.amazonaws.services.cloudwatch.model.MetricDatum> data
    • Constructor Detail

      • AccumulatingMetricsScope

        public AccumulatingMetricsScope()
    • Method Detail

      • addData

        public void addData(String name,                    double value,                    com.amazonaws.services.cloudwatch.model.StandardUnit unit)
        Description copied from interface: IMetricsScope
        Adds a data point to this IMetricsScope. Multiple calls against the same IMetricsScope with the same name parameter will result in accumulation.
        Specified by:
        addData in interface IMetricsScope
        Overrides:
        addData in class EndingMetricsScope
        Parameters:
        name - data point name
        value - data point value
        unit - unit of data point
      • addData

        public void addData(String name,                    double value,                    com.amazonaws.services.cloudwatch.model.StandardUnit unit,                    MetricsLevel level)
        Description copied from interface: IMetricsScope
        Adds a data point to this IMetricsScope if given metrics level is enabled. Multiple calls against the same IMetricsScope with the same name parameter will result in accumulation.
        Specified by:
        addData in interface IMetricsScope
        Overrides:
        addData in class EndingMetricsScope
        Parameters:
        name - data point name
        value - data point value
        unit - unit of data point
        level - metrics level of this data point
      • getKey

        protected abstract KeyType getKey(String name)
        Parameters:
        name - key name for a metric
        Returns:
        the name of the key
      • addData

        public void addData(KeyType key,                    String name,                    double value,                    com.amazonaws.services.cloudwatch.model.StandardUnit unit)
        Adds data points to an IMetricsScope. Multiple calls to IMetricsScopes that have the same key will have their data accumulated.
        Parameters:
        key - data point key
        name - data point name
        value - data point value
        unit - data point unit

Copyright © 2019. All rights reserved.



NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14