@Override
  public void updateImpl(List<Metric> metrics) {
    Preconditions.checkNotNull(metrics, "metrics");

    List<Metric> batch = new ArrayList<>(batchSize);

    for (final Metric m : metrics) {
      if (m.hasNumberValue()) {
        batch.add(m);

        if (batch.size() % batchSize == 0) {
          putMetricData(batch);
          batch.clear();
        }
      }
    }

    if (!batch.isEmpty()) {
      putMetricData(batch);
    }
  }
@ Override public void updateImpl ( List < Metric > metrics ) { Preconditions . checkNotNull ( metrics , "metrics" ) ; List < Metric > batch = new ArrayList < > ( batchSize ) ; for ( final Metric m : metrics ) { if ( m . hasNumberValue ( ) ) { batch . add ( m ) ; if ( batch . size ( ) % batchSize == 0 ) { putMetricData ( batch ) ; batch . clear ( ) ; } } } if ( ! batch . isEmpty ( ) ) { putMetricData ( batch ) ; } }
@param metrics The list of metrics you want to send to CloudWatch