Example usage for com.amazonaws.services.cloudwatch.model MetricDatum getTimestamp

List of usage examples for com.amazonaws.services.cloudwatch.model MetricDatum getTimestamp

Introduction

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

Prototype


public java.util.Date getTimestamp() 

Source Link

Document

The time the metric data was received, expressed as the number of milliseconds since Jan 1, 1970 00:00:00 UTC.

Usage

From source file:com.github.lpezet.antiope.metrics.aws.BlockingRequestBuilder.java

License:Open Source License

/**
 * Returns a metric datum cloned from the given one.
 * Made package private only for testing purposes.
 *///from  ww w  .j  av  a  2s .c om
final MetricDatum cloneMetricDatum(MetricDatum pMd) {
    return new MetricDatum().withDimensions(pMd.getDimensions()) // a new collection is created
            .withMetricName(pMd.getMetricName()).withStatisticValues(pMd.getStatisticValues())
            .withTimestamp(pMd.getTimestamp()).withUnit(pMd.getUnit()).withValue(pMd.getValue());
}

From source file:com.github.lpezet.antiope.metrics.aws.spi.MetricData.java

License:Open Source License

/**
 * Returns a new metric datum cloned from the given metric datum, but
 * replacing the dimensions with the newly specified ones.
 *//*  w  ww  .j a  v a  2s  . c  o m*/
public static MetricDatum newMetricDatum(MetricDatum pFrom, Dimension... pDimensions) {
    return new MetricDatum().withMetricName(pFrom.getMetricName()).withDimensions(pDimensions)
            .withUnit(pFrom.getUnit()).withValue(pFrom.getValue())
            .withStatisticValues(pFrom.getStatisticValues()).withTimestamp(pFrom.getTimestamp());
}