public final class JmxMetricPoller extends java.lang.Object implements MetricPoller
Constructor and Description |
---|
JmxMetricPoller(JmxConnector connector,
java.util.List<javax.management.ObjectName> queries,
MetricFilter counters)
Creates a new instance that polls mbeans matching the provided object
name patterns.
|
JmxMetricPoller(JmxConnector connector,
javax.management.ObjectName query,
MetricFilter counters)
Creates a new instance that polls mbeans matching the provided object
name pattern.
|
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 JmxMetricPoller(JmxConnector connector, javax.management.ObjectName query, MetricFilter counters)
connector
- used to get a connection to an MBeanServerquery
- object name pattern for selecting mbeanscounters
- metrics matching this filter will be treated as
counters, all others will be gaugespublic JmxMetricPoller(JmxConnector connector, java.util.List<javax.management.ObjectName> queries, MetricFilter counters)
connector
- used to get a connection to an MBeanServerqueries
- object name patterns for selecting mbeanscounters
- metrics matching this filter will be treated as
counters, all others will be gaugespublic java.util.List<Metric> poll(MetricFilter filter)
poll
in interface MetricPoller
filter
- retricts the set of metricspublic 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.