Class RequestMetricCollectorSupport
- java.lang.Object
-
- com.amazonaws.metrics.RequestMetricCollector
-
- com.amazonaws.metrics.internal.cloudwatch.RequestMetricCollectorSupport
-
public class RequestMetricCollectorSupport extends RequestMetricCollector
This is the default implementation of an AWS SDK request metric collection system.- See Also:
RequestMetricCollector
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.amazonaws.metrics.RequestMetricCollector
RequestMetricCollector.Factory
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.logging.Log
log
-
Fields inherited from class com.amazonaws.metrics.RequestMetricCollector
NONE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
RequestMetricCollectorSupport(BlockingQueue<MetricDatum> queue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
addMetricsToQueue(MetricDatum metric)
Adds the given metric to the queue, returning true if successful or false if no space available.void
collectMetrics(Request<?> request, Response<?> response)
Collects the metrics at the end of a request/response cycle, transforms the metric data points into a cloud watch metric datum representation, and then adds it to a memory queue so it will get summarized into the necessary statistics and uploaded to Amazon CloudWatch.protected PredefinedMetricTransformer
getTransformer()
Returns the predefined metrics transformer.-
Methods inherited from class com.amazonaws.metrics.RequestMetricCollector
isEnabled
-
-
-
-
Constructor Detail
-
RequestMetricCollectorSupport
protected RequestMetricCollectorSupport(BlockingQueue<MetricDatum> queue)
-
-
Method Detail
-
collectMetrics
public void collectMetrics(Request<?> request, Response<?> response)
Collects the metrics at the end of a request/response cycle, transforms the metric data points into a cloud watch metric datum representation, and then adds it to a memory queue so it will get summarized into the necessary statistics and uploaded to Amazon CloudWatch.- Specified by:
collectMetrics
in classRequestMetricCollector
- See Also:
Request.getAWSRequestMetrics()
-
addMetricsToQueue
protected boolean addMetricsToQueue(MetricDatum metric)
Adds the given metric to the queue, returning true if successful or false if no space available.
-
getTransformer
protected PredefinedMetricTransformer getTransformer()
Returns the predefined metrics transformer.
-
-