Package com.yahoo.metrics.simple
Class MetricSettings.Builder
- java.lang.Object
-
- com.yahoo.metrics.simple.MetricSettings.Builder
-
- Enclosing class:
- MetricSettings
@Beta public static final class MetricSettings.Builder extends java.lang.Object
A builder for the immutable MetricSettings instances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Create a new builder for a MetricSettings instance with default settings.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MetricSettings
build()
Build a fresh MetricSettings instance.MetricSettings.Builder
histogram(boolean histogram)
Set whether a resulting metric should have a histogram.
-
-
-
Method Detail
-
histogram
public MetricSettings.Builder histogram(boolean histogram)
Set whether a resulting metric should have a histogram. Default is false.- Parameters:
histogram
- whether to generate a histogram- Returns:
- this, to facilitate chaining
-
build
public MetricSettings build()
Build a fresh MetricSettings instance.- Returns:
- a MetricSettings instance containing the values set in this builder
-
-