public static interface Observer.Builder extends Instrument.Builder
Observer.| Modifier and Type | Method and Description |
|---|---|
Observer<?> |
build()
Builds and returns a
Instrument with the desired options. |
Observer.Builder |
setConstantLabels(Map<String,String> constantLabels)
Sets the map of constant labels (they will be added to all the Bound Instruments) for the
Instrument.
|
Observer.Builder |
setDescription(String description)
Sets the description of the
Instrument. |
Observer.Builder |
setLabelKeys(List<String> labelKeys)
Sets the list of label keys for the Instrument.
|
Observer.Builder |
setMonotonic(boolean monotonic)
Sets the monotonicity property for this
Instrument. |
Observer.Builder |
setUnit(String unit)
Sets the unit of the
Instrument. |
Observer.Builder setDescription(String description)
Instrument.BuilderInstrument.
Default value is "".
setDescription in interface Instrument.Builderdescription - the description of the Instrument.Observer.Builder setUnit(String unit)
Instrument.BuilderInstrument.
Default value is "1".
setUnit in interface Instrument.Builderunit - the unit of the Instrument.Observer.Builder setLabelKeys(List<String> labelKeys)
Instrument.BuilderDefault value is Collections.emptyList()
setLabelKeys in interface Instrument.BuilderlabelKeys - the list of label keys for the Instrument.Observer.Builder setConstantLabels(Map<String,String> constantLabels)
Instrument.BuilderDefault value is Collections.emptyMap().
setConstantLabels in interface Instrument.BuilderconstantLabels - the map of constant labels for the Instrument.Observer.Builder setMonotonic(boolean monotonic)
Instrument. If true successive values
are expected to rise monotonically.
Default value is false
monotonic - true successive values are expected to rise monotonically.Observer<?> build()
Instrument.BuilderInstrument with the desired options.build in interface Instrument.BuilderInstrument with the desired options.