public class CompositeMetricPoller extends java.lang.Object implements MetricPoller
Constructor and Description |
---|
CompositeMetricPoller(java.util.Map<java.lang.String,MetricPoller> pollers,
java.util.concurrent.ExecutorService executor,
long timeout)
Creates a new instance for a set of pollers.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Metric> |
poll(MetricFilter filter)
Fetch the current values for a set of metrics that match the provided
filter.
|
java.util.List<Metric> |
poll(MetricFilter filter,
boolean reset)
Fetch the current values for a set of metrics that match the provided
filter.
|
public CompositeMetricPoller(java.util.Map<java.lang.String,MetricPoller> pollers, java.util.concurrent.ExecutorService executor, long timeout)
pollers
- a set of pollers to collect data from, the map key for a
poller is used as a name identify a particular poller
for logging and error messagesexecutor
- an executor to use for executing the poll methodstimeout
- timeout in milliseconds used when getting the value
from the futurepublic final java.util.List<Metric> poll(MetricFilter filter)
poll
in interface MetricPoller
filter
- retricts the set of metricspublic final java.util.List<Metric> poll(MetricFilter filter, boolean reset)
poll
in interface MetricPoller
filter
- retricts the set of metricsreset
- ignored. This is kept for backwards compatibility only.