Module io.helidon.metrics.api
Package io.helidon.metrics.api
Interface Meter.Builder<B extends Meter.Builder<B,M>,M extends Meter>
- Type Parameters:
B
- type of the builderM
- type of the meter the builder creates
- All Superinterfaces:
Wrapper
- All Known Subinterfaces:
Counter.Builder
,DistributionSummary.Builder
,FunctionalCounter.Builder<T>
,Gauge.Builder<N>
,Timer.Builder
- Enclosing interface:
Meter
Common behavior of specific meter builders.
This builder does not extend the conventional Helidon builder because, typically, "building" a meter involves
registering it which is implementation-specific and therefore should be performed only by each implementation.
We do not want developers to see a build()
operation that they should not invoke.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionAdds a single tag to the builder's collection.baseUnit()
Returns the base unit the builder will use.Sets the units.Returns the description the builder will use.description
(String description) Sets the description.default B
identity()
Returns the type-correct "this".name()
Returns the name the builder will use.scope()
Returns the scope set in the builder, if any.Sets the scope to be associated with this meter.tags()
Returns the tags the builder will use.Sets the tags to use in identifying the build meter.
-
Method Details
-
identity
Returns the type-correct "this".- Returns:
- properly-typed builder itself
-
tags
Sets the tags to use in identifying the build meter.- Parameters:
tags
-Tag
instances to identify the meter- Returns:
- updated builder
-
addTag
Adds a single tag to the builder's collection.- Parameters:
tag
- the tag to add- Returns:
- updated builder
-
description
Sets the description.- Parameters:
description
- meter description- Returns:
- updated builder
-
baseUnit
Sets the units.- Parameters:
baseUnit
- meter unit- Returns:
- updated builder
-
scope
Sets the scope to be associated with this meter.- Parameters:
scope
- scope- Returns:
- updated builder
-
name
String name()Returns the name the builder will use.- Returns:
- name
-
tags
Returns the tags the builder will use.- Returns:
- tags
-
description
Returns the description the builder will use.- Returns:
- description if set; empty otherwise
-
baseUnit
Returns the base unit the builder will use.- Returns:
- base unit if set; empty otherwise
-
scope
Returns the scope set in the builder, if any.- Returns:
- the assigned scope if set; empty otherwise
-