Class AWSRequestMetrics
java.lang.Object
com.amazonaws.util.AWSRequestMetrics
- Direct Known Subclasses:
AWSRequestMetricsFullSupport
Used as both a base class and a minimal support of AWS SDK request metrics.
The base class of supporting AWS SDK request metrics.
In contrast to AWSRequestMetricsFullSupport, which is intended to be
a full support of AWS SDK request metrics, this class only provides access to
a TimingInfo instance that only has minimal support for start and end
time (ie with no-ops for sub-event measurements) for backward compatibility
reason. The other methods related to properties and counters in this class
are effectively no-ops.
This class is instantiated instead of AWSRequestMetricsFullSupport
when request metric collection is not required during a particular service
request/response cycle.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumPredefined AWS SDK metric types general across all AWS clients. -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionThis constructor should be used only in the case when AWS SDK metrics collector is disabled, when minimal timing info is supported for backward compatibility reasons.protectedAWSRequestMetrics(TimingInfo timingInfo) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperty(MetricType f, Object value) voidaddProperty(String propertyName, Object value) final AWSRequestMetricsaddPropertyWith(MetricType f, Object value) Fluent API ofaddProperty(MetricType, Object)final AWSRequestMetricsaddPropertyWith(String propertyName, Object value) Fluent API ofaddProperty(String, Object)voidvoidgetProperty(String propertyName) final TimingInfovoidvoidincrementCounter(String event) final AWSRequestMetricsFluent API ofincrementCounter(MetricType)final AWSRequestMetricsincrementCounterWith(String event) Fluent API ofincrementCounter(String)booleanReturns true if this metrics is enabled; false otherwise.voidlog()voidsetCounter(MetricType f, long count) voidsetCounter(String counterName, long count) voidvoidstartEvent(String eventName) final AWSRequestMetricswithCounter(MetricType f, long count) Fluent API ofsetCounter(MetricType, long)final AWSRequestMetricswithCounter(String counterName, long count) Fluent API ofsetCounter(String, long)
-
Field Details
-
timingInfo
-
-
Constructor Details
-
AWSRequestMetrics
public AWSRequestMetrics()This constructor should be used only in the case when AWS SDK metrics collector is disabled, when minimal timing info is supported for backward compatibility reasons.- See Also:
-
AWSRequestMetrics
-
-
Method Details
-
getTimingInfo
-
isEnabled
public boolean isEnabled()Returns true if this metrics is enabled; false otherwise. Returns false by default. -
startEvent
-
startEvent
-
endEvent
-
endEvent
-
incrementCounter
-
incrementCounter
-
incrementCounterWith
Fluent API ofincrementCounter(String) -
incrementCounterWith
Fluent API ofincrementCounter(MetricType) -
setCounter
-
setCounter
-
withCounter
Fluent API ofsetCounter(String, long) -
withCounter
Fluent API ofsetCounter(MetricType, long) -
addProperty
-
addProperty
-
addPropertyWith
Fluent API ofaddProperty(String, Object) -
addPropertyWith
Fluent API ofaddProperty(MetricType, Object) -
log
public void log() -
getProperty
-
getProperty
-