public static class GraphiteReporterConfig.Builder extends Object
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_REPORTING_INTERVAL_IN_SECONDS |
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
GraphiteReporterConfig.Builder |
address(String host,
int port)
Sets the host and port for connecting to the Graphite instance.
|
GraphiteReporterConfig.Builder |
blockedStartsWithFilters(Set<String> blockedStartsWithFilters)
Sets the blacklist filters to be applied to metric names.
|
GraphiteReporterConfig |
build() |
GraphiteReporterConfig.Builder |
enableBatching(boolean enableBatching)
Indicates whether batching should be enabled or not.
|
GraphiteReporterConfig.Builder |
enableReporter(boolean enableReporter)
Indicates whether the reporter should be enabled or not.
|
GraphiteReporterConfig.Builder |
reportingInterval(long period,
TimeUnit timeUnit)
Sets the reporting interval.
|
GraphiteReporterConfig.Builder |
reportOnShutdown(boolean reportOnShutdown)
Indicates whether metrics should be published to Graphite prior to shutting down the reporter or not.
|
GraphiteReporterConfig.Builder |
startsWithFilters(Set<String> startsWithFilters)
Sets the whitelist filters to be applied to metric names.
|
public static final long DEFAULT_REPORTING_INTERVAL_IN_SECONDS
public GraphiteReporterConfig.Builder enableReporter(boolean enableReporter)
enableReporter - indicates whether the reporter should be enabled or not.public GraphiteReporterConfig.Builder address(String host, int port)
host - a hostname or IP address.port - a port number.IllegalArgumentException - if host is blank.IllegalArgumentException - if port is outside of the valid range of [0, 65535].public GraphiteReporterConfig.Builder reportingInterval(long period, TimeUnit timeUnit)
period - an interval at which to push data to Graphite.timeUnit - the unit for period.IllegalArgumentException - if period is less than or equal to 0.NullPointerException - if timeUnit is null.public GraphiteReporterConfig.Builder enableBatching(boolean enableBatching)
enableBatching - indicates whether batching should be enabled or not.public GraphiteReporterConfig.Builder reportOnShutdown(boolean reportOnShutdown)
reportOnShutdown - indicates whether metrics should be reported prior to shutting down or not.public GraphiteReporterConfig.Builder startsWithFilters(Set<String> startsWithFilters)
MetricNamingUtil.SEPARATOR and multiple wildcards denoted as
*.startsWithFilters - whitelist filters to be applied to metric names.public GraphiteReporterConfig.Builder blockedStartsWithFilters(Set<String> blockedStartsWithFilters)
MetricNamingUtil.SEPARATOR and multiple wildcards denoted as
*.blockedStartsWithFilters - blacklist filters to be applied to metric names.public GraphiteReporterConfig build()
Copyright © 2016–2017. All rights reserved.