public final class IntervalMetricReader extends Object
MetricReader which automatically reads and exports the metrics every
export interval.| Modifier and Type | Class and Description |
|---|---|
static class |
IntervalMetricReader.Options
Options for
IntervalMetricReader. |
| Modifier and Type | Method and Description |
|---|---|
static IntervalMetricReader |
create(MetricExporter metricExporter,
MetricReader metricReader,
IntervalMetricReader.Options options)
Creates a new
IntervalMetricReader. |
void |
readAndExportNow()
Reads and exports data immediately.
|
void |
stop()
Stops the worker thread by calling
Thread.interrupt(). |
public static IntervalMetricReader create(MetricExporter metricExporter, MetricReader metricReader, IntervalMetricReader.Options options)
IntervalMetricReader.metricExporter - the MetricExporter to be called after.metricReader - the MetricReader to be used to read metrics.options - the IntervalMetricReader.Options for the new IntervalMetricReader.IntervalMetricReader.public void readAndExportNow()
public void stop()
Thread.interrupt().