Class MetricUploader
- java.lang.Object
-
- software.amazon.awssdk.metrics.publishers.cloudwatch.internal.MetricUploader
-
public class MetricUploader extends Object
UploadsPutMetricDataRequest
s to aCloudWatchAsyncClient
, logging whether it was successful or a failure to theCloudWatchMetricLogger.METRIC_LOGGER
.
-
-
Constructor Summary
Constructors Constructor Description MetricUploader(CloudWatchAsyncClient cloudWatchClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close(boolean closeClient)
CompletableFuture<Void>
upload(List<PutMetricDataRequest> requests)
Upload the provided list of requests to CloudWatch, completing the returned future when the uploads complete.
-
-
-
Constructor Detail
-
MetricUploader
public MetricUploader(CloudWatchAsyncClient cloudWatchClient)
-
-
Method Detail
-
upload
public CompletableFuture<Void> upload(List<PutMetricDataRequest> requests)
Upload the provided list of requests to CloudWatch, completing the returned future when the uploads complete. Note: This will log a message if one of the provided requests fails.
-
close
public void close(boolean closeClient)
-
-