Interface Meter.Builder<B extends Meter.Builder<B,M>,M extends Meter>

Type Parameters:
B - type of the builder
M - 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

public static interface Meter.Builder<B extends Meter.Builder<B,M>,M extends Meter> extends Wrapper
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 Details

    • identity

      default B identity()
      Returns the type-correct "this".
      Returns:
      properly-typed builder itself
    • tags

      B tags(Iterable<Tag> tags)
      Sets the tags to use in identifying the build meter.
      Parameters:
      tags - Tag instances to identify the meter
      Returns:
      updated builder
    • addTag

      B addTag(Tag tag)
      Adds a single tag to the builder's collection.
      Parameters:
      tag - the tag to add
      Returns:
      updated builder
    • description

      B description(String description)
      Sets the description.
      Parameters:
      description - meter description
      Returns:
      updated builder
    • baseUnit

      B baseUnit(String baseUnit)
      Sets the units.
      Parameters:
      baseUnit - meter unit
      Returns:
      updated builder
    • scope

      B scope(String 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

      Map<String,String> tags()
      Returns the tags the builder will use.
      Returns:
      tags
    • description

      Optional<String> description()
      Returns the description the builder will use.
      Returns:
      description if set; empty otherwise
    • baseUnit

      Optional<String> baseUnit()
      Returns the base unit the builder will use.
      Returns:
      base unit if set; empty otherwise
    • scope

      Optional<String> scope()
      Returns the scope set in the builder, if any.
      Returns:
      the assigned scope if set; empty otherwise