public static final class IntervalMetricReader.Builder extends ConfigBuilder<IntervalMetricReader.Builder>
IntervalMetricReader
.ConfigBuilder.NamingConvention
Modifier and Type | Method and Description |
---|---|
IntervalMetricReader |
build()
Builds a new
IntervalMetricReader with current settings. |
protected IntervalMetricReader.Builder |
fromConfigMap(Map<String,String> configMap,
ConfigBuilder.NamingConvention namingConvention)
Sets the configuration values from the given configuration map for only the available keys.
|
IntervalMetricReader.Builder |
setExportIntervalMillis(long exportIntervalMillis)
Sets the export interval.
|
IntervalMetricReader.Builder |
setMetricExporter(MetricExporter metricExporter)
Sets the exporter to be called when export metrics.
|
IntervalMetricReader.Builder |
setMetricProducers(Collection<MetricProducer> metricProducers)
Sets a collection of
MetricProducer from where the metrics should be read. |
getBooleanProperty, getDoubleProperty, getIntProperty, getLongProperty, getStringProperty, readEnvironmentVariables, readProperties, readSystemProperties
public IntervalMetricReader.Builder setExportIntervalMillis(long exportIntervalMillis)
exportIntervalMillis
- the export interval between pushes to the exporter.public IntervalMetricReader.Builder setMetricExporter(MetricExporter metricExporter)
metricExporter
- the MetricExporter
to be called when export metrics.public IntervalMetricReader.Builder setMetricProducers(Collection<MetricProducer> metricProducers)
MetricProducer
from where the metrics should be read.metricProducers
- a collection of MetricProducer
from where the metrics should
be read.public IntervalMetricReader build()
IntervalMetricReader
with current settings.IntervalMetricReader
.protected IntervalMetricReader.Builder fromConfigMap(Map<String,String> configMap, ConfigBuilder.NamingConvention namingConvention)
fromConfigMap
in class ConfigBuilder<IntervalMetricReader.Builder>
configMap
- Map
holding the configuration values.