Package ratpack.dropwizard.metrics
Class GraphiteConfig
- java.lang.Object
-
- ratpack.dropwizard.metrics.ReporterConfigSupport<T>
-
- ratpack.dropwizard.metrics.ScheduledReporterConfigSupport<GraphiteConfig>
-
- ratpack.dropwizard.metrics.GraphiteConfig
-
public class GraphiteConfig extends ScheduledReporterConfigSupport<GraphiteConfig>
A Configuration implementation to setupGraphiteReporter
instances.
-
-
Constructor Summary
Constructors Constructor Description GraphiteConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GraphiteConfig
disable()
Disable the Graphite publisher.GraphiteConfig
durationUnit(java.util.concurrent.TimeUnit durationUnit)
Convert durations to the given time unit.GraphiteConfig
enable()
Enable the Graphite publisher.java.util.concurrent.TimeUnit
getDurationUnit()
The state of duration conversion.java.lang.String
getPrefix()
The state of the metric name prefix.java.util.concurrent.TimeUnit
getRateUnit()
The state of rate conversion.com.codahale.metrics.graphite.GraphiteSender
getSender()
TheGraphiteSender
instance.boolean
isEnabled()
The state of the Graphite publisher.GraphiteConfig
prefix(java.lang.String prefix)
Prefix all metric names with the given string.GraphiteConfig
rateUnit(java.util.concurrent.TimeUnit rateUnit)
Convert rates to the given time unit.GraphiteConfig
sender(com.codahale.metrics.graphite.GraphiteSender sender)
Configure theGraphiteSender
instance.-
Methods inherited from class ratpack.dropwizard.metrics.ScheduledReporterConfigSupport
getReporterInterval, reporterInterval
-
Methods inherited from class ratpack.dropwizard.metrics.ReporterConfigSupport
excludeFilter, getExcludeFilter, getIncludeFilter, includeFilter
-
-
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
The state of the Graphite publisher.- Returns:
- the state of the Graphite publisher
-
enable
public GraphiteConfig enable()
Enable the Graphite publisher.- Returns:
- this
-
disable
public GraphiteConfig disable()
Disable the Graphite publisher.- Returns:
- this
-
getSender
public com.codahale.metrics.graphite.GraphiteSender getSender()
TheGraphiteSender
instance.- Returns:
- the Graphite report sender
-
sender
public GraphiteConfig sender(com.codahale.metrics.graphite.GraphiteSender sender)
Configure theGraphiteSender
instance.- Parameters:
sender
- the report sender- Returns:
this
-
getPrefix
public java.lang.String getPrefix()
The state of the metric name prefix.- Returns:
- the metric prefix value
-
prefix
public GraphiteConfig prefix(java.lang.String prefix)
Prefix all metric names with the given string.- Parameters:
prefix
- the prefix for all metric names- Returns:
this
-
getRateUnit
public java.util.concurrent.TimeUnit getRateUnit()
The state of rate conversion.- Returns:
- the rate conversion unit
-
rateUnit
public GraphiteConfig rateUnit(java.util.concurrent.TimeUnit rateUnit)
Convert rates to the given time unit.- Parameters:
rateUnit
- a unit of time- Returns:
this
-
getDurationUnit
public java.util.concurrent.TimeUnit getDurationUnit()
The state of duration conversion.- Returns:
- the duration conversion unit
-
durationUnit
public GraphiteConfig durationUnit(java.util.concurrent.TimeUnit durationUnit)
Convert durations to the given time unit.- Parameters:
durationUnit
- a unit of time- Returns:
this
-
-