library/src/main/java/com/kdgregory/aws/utils/cloudwatch/MetricReporter.java
/**
     *  Adds a metric to the queue to be reported by the next {@link #flush}.
     *
     *  @param  metricName  The metric's name.
     *  @param  timestamp   The metric's timestamp.
     *  @param  value       The metric's value.
     *  @param  units       The metric's unit type.
     *  @param  isHiRes     If true, report as high resolution.
     *  @param  dimension   Overrides or supplements the default dimensions.
     */
Adds a metric to the queue to be reported by the next  #flush.
@param  metricName  The metric's name.
@param  timestamp   The metric's timestamp.
@param  value       The metric's value.
@param  units       The metric's unit type.
@param  isHiRes     If true, report as high resolution.
@param  dimension   Overrides or supplements the default dimensions.
Adds a metric to the queue to be reported by the next #flush . @param metricName The metric ' s name . @param timestamp The metric ' s timestamp . @param value The metric ' s value . @param units The metric ' s unit type . @param isHiRes If true report as high resolution . @param dimension Overrides or supplements the default dimensions .
public void add(String metricName, long timestamp, Map<String,String> dimensions,
                    double value, StandardUnit units, boolean isHiRes)
    {
        Integer storageResolution = isHiRes ? Integer.valueOf(1) : Integer.valueOf(60);
        MetricDatum datum = new MetricDatum()
                            .withMetricName(metricName)
                            .withTimestamp(new Date(timestamp))
                            .withDimensions(createDimensionsList(dimensions))
                            .withStorageResolution(storageResolution)
                            .withUnit(unit)
                            .withValue(value);
        queuedMetrics.add(datum);
    }
public void add ( String metricName , long timestamp , Map < String , String > dimensions , double value , StandardUnit units , boolean isHiRes ) { Integer storageResolution = isHiRes ? Integer . valueOf ( 1 ) : Integer . valueOf ( 60 ) ; MetricDatum datum = new MetricDatum ( ) . withMetricName ( metricName ) . withTimestamp ( new Date ( timestamp ) ) . withDimensions ( createDimensionsList ( dimensions ) ) . withStorageResolution ( storageResolution ) . withUnit ( unit ) . withValue ( value ) ; queuedMetrics . add ( datum ) ; }
Adds a metric to the queue to be reported by the next {@link #flush}.
Adds a metric to the queue to be reported by the next { @link #flush } .