Class Metrics.BuilderBase<BUILDER extends Metrics.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends Metrics>

java.lang.Object
io.helidon.inject.api.Metrics.BuilderBase<BUILDER,PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
Metrics.Builder
Enclosing interface:
Metrics

public abstract static class Metrics.BuilderBase<BUILDER extends Metrics.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends Metrics> extends Object implements Prototype.Builder<BUILDER,PROTOTYPE>
Fluent API builder base for Metrics.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(Metrics prototype)
      Update this builder from an existing prototype instance.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(Metrics.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • clearServiceCount

      public BUILDER clearServiceCount()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • serviceCount

      public BUILDER serviceCount(int serviceCount)
      The total service count in the registry.
      Parameters:
      serviceCount - total service count
      Returns:
      updated builder instance
      See Also:
    • clearLookupCount

      public BUILDER clearLookupCount()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • lookupCount

      public BUILDER lookupCount(int lookupCount)
      The total number of Services::lookup() calls since jvm start, or since last reset.
      Parameters:
      lookupCount - lookup count
      Returns:
      updated builder instance
      See Also:
    • clearCacheLookupCount

      public BUILDER clearCacheLookupCount()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • cacheLookupCount

      public BUILDER cacheLookupCount(int cacheLookupCount)
      The total number of Services::lookup() calls that were attempted against the lookup cache. This will be empty if caching is disabled.
      Parameters:
      cacheLookupCount - cache lookup count
      Returns:
      updated builder instance
      See Also:
    • clearCacheHitCount

      public BUILDER clearCacheHitCount()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • cacheHitCount

      public BUILDER cacheHitCount(int cacheHitCount)
      The total number of Services:lookup() calls that were successfully resolved via cache. This will be a value less than or equal to cacheLookupCount().
      Parameters:
      cacheHitCount - cache hit count
      Returns:
      updated builder instance
      See Also:
    • serviceCount

      public Optional<Integer> serviceCount()
      The total service count in the registry.
      Returns:
      the service count
    • lookupCount

      public Optional<Integer> lookupCount()
      The total number of Services::lookup() calls since jvm start, or since last reset.
      Returns:
      the lookup count
    • cacheLookupCount

      public Optional<Integer> cacheLookupCount()
      The total number of Services::lookup() calls that were attempted against the lookup cache. This will be empty if caching is disabled.
      Returns:
      the cache lookup count
      See Also:
    • cacheHitCount

      public Optional<Integer> cacheHitCount()
      The total number of Services:lookup() calls that were successfully resolved via cache. This will be a value less than or equal to cacheLookupCount().
      Returns:
      the cache hit count
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.