public final class DefaultMetricCollector extends Object implements MetricCollector
| Constructor and Description |
|---|
DefaultMetricCollector(String name) |
| Modifier and Type | Method and Description |
|---|---|
MetricCollection |
collect()
Return the collected metrics.
|
static MetricCollector |
create(String name) |
MetricCollector |
createChild(String name)
Create a child of this metric collector.
|
String |
name() |
<T> void |
reportMetric(SdkMetric<T> metric,
T data)
Report a metric.
|
String |
toString() |
public DefaultMetricCollector(String name)
public String name()
name in interface MetricCollectorpublic <T> void reportMetric(SdkMetric<T> metric, T data)
MetricCollectorreportMetric in interface MetricCollectorpublic MetricCollector createChild(String name)
MetricCollectorcreateChild in interface MetricCollectorname - The name of the child collector.public MetricCollection collect()
MetricCollector
Calling collect() prevents further invocations of MetricCollector.reportMetric(SdkMetric, Object).
collect in interface MetricCollectorpublic static MetricCollector create(String name)
create in interface MetricCollectorCopyright © 2022. All rights reserved.