Class SingleTagValueAggregator

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getFilterMetricName()  
      long getValue​(java.lang.String name)
      Gets the metric value of the given fully qualified metric name.
      java.util.Map<java.lang.String,​java.lang.Long> updateValues​(java.util.Set<Metric> set)
      Updates the aggregated values from the filtered metrics.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SingleTagValueAggregator

        public SingleTagValueAggregator​(java.lang.String aggregationName,
                                        java.lang.String metricName,
                                        java.lang.String tagName)
        Constructs a new instance of SingleTagValueAggregator.
        Parameters:
        aggregationName - the aggregated metric name
        metricName - metric name
        tagName - tag name
    • Method Detail

      • updateValues

        public java.util.Map<java.lang.String,​java.lang.Long> updateValues​(java.util.Set<Metric> set)
        Description copied from interface: MultiValueMetricsAggregator
        Updates the aggregated values from the filtered metrics. The values of map will be the filtered metrics using the metric name defined in MultiValueMetricsAggregator.getFilterMetricName(). The returned values are organized as a map from the metric name to metric value.
        Specified by:
        updateValues in interface MultiValueMetricsAggregator
        Parameters:
        set - a map of metric name to the set of metrics that have the metric name
        Returns:
        the aggregated values
      • getValue

        public long getValue​(java.lang.String name)
        Description copied from interface: MultiValueMetricsAggregator
        Gets the metric value of the given fully qualified metric name.
        Specified by:
        getValue in interface MultiValueMetricsAggregator
        Parameters:
        name - the fully qualified metric name
        Returns:
        the metric value, 0 if the metric name does not exist