Class Gauge.Builder<T>
- java.lang.Object
-
- org.forgerock.monitoring.api.instrument.Gauge.Builder<T>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Gauge.Builder<T>
baseUnit(String unit)
Gauge.Builder<T>
description(String description)
Gauge.Builder
hierarchicalName(String hierarchicalName)
Gauge
register(MeterRegistry registry)
Add the gauge to a single registry, or return an existing gauge in that registry.Gauge.Builder<T>
tag(String key, String value)
Gauge.Builder<T>
tags(Iterable<Tag> tags)
Gauge.Builder<T>
tags(String... tags)
-
-
-
Method Detail
-
tags
public Gauge.Builder<T> tags(String... tags)
- Parameters:
tags
- Must be an even number of arguments representing key/value pairs of tags.- Returns:
- The gauge builder with added tags.
-
tags
public Gauge.Builder<T> tags(Iterable<Tag> tags)
- Parameters:
tags
- Tags to add to the eventual meter.- Returns:
- The gauge builder with added tags.
-
tag
public Gauge.Builder<T> tag(String key, String value)
- Parameters:
key
- The tag key.value
- The tag value.- Returns:
- The gauge builder with a single added tag.
-
description
public Gauge.Builder<T> description(@Nullable String description)
- Parameters:
description
- Description text of the eventual gauge.- Returns:
- The gauge builder with added description.
-
baseUnit
public Gauge.Builder<T> baseUnit(@Nullable String unit)
- Parameters:
unit
- Base unit of the eventual gauge.- Returns:
- The gauge builder with added base unit.
-
hierarchicalName
public Gauge.Builder hierarchicalName(String hierarchicalName)
- Parameters:
hierarchicalName
- the hierarchical representation of the meter name- Returns:
- The gauge builder with added hierarchical name.
-
register
public Gauge register(MeterRegistry registry)
Add the gauge to a single registry, or return an existing gauge in that registry. The returned gauge will be unique for each registry, but each registry is guaranteed to only create one gauge for the same combination of name and tags.- Parameters:
registry
- A registry to add the gauge to, if it doesn't already exist.- Returns:
- A new or existing gauge.
-
-