Example usage for com.amazonaws.services.cloudwatch.model Datapoint getMaximum

List of usage examples for com.amazonaws.services.cloudwatch.model Datapoint getMaximum

Introduction

In this page you can find the example usage for com.amazonaws.services.cloudwatch.model Datapoint getMaximum.

Prototype


public Double getMaximum() 

Source Link

Document

The maximum metric value for the data point.

Usage

From source file:com.appdynamics.extensions.cloudwatch.metricsmanager.MetricsManager.java

License:Apache License

protected Double getValue(String namespace, String metricName, Datapoint data) {
    MetricType type = getMetricType(namespace, metricName);
    Double value = null;/*w ww. ja  va2s  .c om*/

    switch (type) {
    case AVE:
        value = data.getAverage();
        break;
    case MAX:
        value = data.getMaximum();
        break;
    case MIN:
        value = data.getMinimum();
        break;
    case SUM:
        value = data.getSum();
        break;
    case SAMPLE_COUNT:
        value = data.getSampleCount();
        break;
    }

    return value;
}