public class MetricListener extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DELIMITER |
static String |
ROOT_METRIC_GROUP_NAME |
| Constructor and Description |
|---|
MetricListener() |
| Modifier and Type | Method and Description |
|---|---|
Optional<org.apache.flink.metrics.Counter> |
getCounter(String... identifier)
Get registered
Counter with identifier relative to the root metric group. |
<T> Optional<org.apache.flink.metrics.Gauge<T>> |
getGauge(String... identifier)
Get registered
Gauge with identifier relative to the root metric group. |
Optional<org.apache.flink.metrics.Histogram> |
getHistogram(String... identifier)
Get registered
Histogram with identifier relative to the root metric group. |
Optional<org.apache.flink.metrics.Meter> |
getMeter(String... identifier)
Get registered
Meter with identifier relative to the root metric group. |
<T extends org.apache.flink.metrics.Metric> |
getMetric(Class<T> metricType,
String... identifier)
Get registered
Metric with identifier relative to the root metric group. |
org.apache.flink.metrics.MetricGroup |
getMetricGroup()
Get the root metric group of this listener.
|
public static final String DELIMITER
public static final String ROOT_METRIC_GROUP_NAME
public org.apache.flink.metrics.MetricGroup getMetricGroup()
public <T extends org.apache.flink.metrics.Metric> Optional<T> getMetric(Class<T> metricType, String... identifier)
Metric with identifier relative to the root metric group.
For example, identifier of metric "myMetric" registered in group "myGroup" under root metric group can be reached by identifier ("myGroup", "myMetric")
identifier - identifier relative to the root metric grouppublic Optional<org.apache.flink.metrics.Meter> getMeter(String... identifier)
Meter with identifier relative to the root metric group.identifier - identifier relative to the root metric grouppublic Optional<org.apache.flink.metrics.Counter> getCounter(String... identifier)
Counter with identifier relative to the root metric group.identifier - identifier relative to the root metric grouppublic Optional<org.apache.flink.metrics.Histogram> getHistogram(String... identifier)
Histogram with identifier relative to the root metric group.identifier - identifier relative to the root metric groupCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.