Class MetricValueConverter

  • All Implemented Interfaces:
    java.util.function.Function<com.amazonaws.services.cloudwatch.model.GetMetricStatisticsResult,​java.util.List<com.elastisys.autoscaler.core.api.types.MetricValue>>

    public class MetricValueConverter
    extends java.lang.Object
    implements java.util.function.Function<com.amazonaws.services.cloudwatch.model.GetMetricStatisticsResult,​java.util.List<com.elastisys.autoscaler.core.api.types.MetricValue>>
    A Callable task that takes a collection of CloudWatch Datapoints, represented as a GetMetricStatisticsResponse object, as input and converts them to a List of MetricValues.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<com.elastisys.autoscaler.core.api.types.MetricValue> apply​(com.amazonaws.services.cloudwatch.model.GetMetricStatisticsResult input)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Function

        andThen, compose
    • Constructor Detail

      • MetricValueConverter

        public MetricValueConverter​(CloudWatchStatistic statistic)
        Constructs a new MetricValueConverter that, for each in a collection of CloudWatch Datapoints, will extract a particular statistic and convert it to a MetricValue.
        Parameters:
        statistic - The statistic to extract from each Datapoint.
    • Method Detail

      • apply

        public java.util.List<com.elastisys.autoscaler.core.api.types.MetricValue> apply​(com.amazonaws.services.cloudwatch.model.GetMetricStatisticsResult input)
        Specified by:
        apply in interface java.util.function.Function<com.amazonaws.services.cloudwatch.model.GetMetricStatisticsResult,​java.util.List<com.elastisys.autoscaler.core.api.types.MetricValue>>