Package com.amazonaws.metrics
Class MetricCollector
- java.lang.Object
-
- com.amazonaws.metrics.MetricCollector
-
- Direct Known Subclasses:
MetricCollectorSupport
public abstract class MetricCollector extends Object
Metric Collector SPI. This is a class instead of interface so in case of adding new methods in the future we can do that safetly without breaking any existing clients that implements this SPI.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
MetricCollector.Factory
Can be used to serve as a factory for the request metric collector.
-
Field Summary
Fields Modifier and Type Field Description static MetricCollector
NONE
A convenient instance of a no-op request metric collector.
-
Constructor Summary
Constructors Constructor Description MetricCollector()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract RequestMetricCollector
getRequestMetricCollector()
abstract ServiceMetricCollector
getServiceMetricCollector()
abstract boolean
isEnabled()
Returns true if this collector is enabled; false otherwise.abstract boolean
start()
Starts the request metric collector.abstract boolean
stop()
Stops the request metric collector.
-
-
-
Field Detail
-
NONE
public static final MetricCollector NONE
A convenient instance of a no-op request metric collector.
-
-
Method Detail
-
start
public abstract boolean start()
Starts the request metric collector.- Returns:
- true if the collector is successfully started; false otherwise.
-
stop
public abstract boolean stop()
Stops the request metric collector.- Returns:
- true if the collector is successfully stopped; false if the collector is not running and therefore the call has no effect.
-
isEnabled
public abstract boolean isEnabled()
Returns true if this collector is enabled; false otherwise.
-
getRequestMetricCollector
public abstract RequestMetricCollector getRequestMetricCollector()
-
getServiceMetricCollector
public abstract ServiceMetricCollector getServiceMetricCollector()
-
-