Class AbstractMetrics

java.lang.Object
io.helidon.pico.api.AbstractMetrics
All Implemented Interfaces:
Metrics
Direct Known Subclasses:
DefaultMetrics

@Generated(value="io.helidon.builder.processor.tools.DefaultBuilderCreatorProvider", comments="version=1") public abstract class AbstractMetrics extends Object implements Metrics
Abstract implementation w/ builder for Metrics.
  • Constructor Details

    • AbstractMetrics

      protected AbstractMetrics(AbstractMetrics.Builder<?,?> b)
      Constructor using the builder argument.
      Parameters:
      b - the builder
  • Method Details

    • serviceCount

      public Optional<Integer> serviceCount()
      Description copied from interface: Metrics
      The total service count in the registry.
      Specified by:
      serviceCount in interface Metrics
      Returns:
      total service count
    • lookupCount

      public Optional<Integer> lookupCount()
      Description copied from interface: Metrics
      The total number of Services::lookup() calls since jvm start, or since last reset.
      Specified by:
      lookupCount in interface Metrics
      Returns:
      lookup count
    • cacheLookupCount

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

      public Optional<Integer> cacheHitCount()
      Description copied from interface: Metrics
      The total number of Services:lookup() calls that were successfully resolved via cache. This will be a value less than or equal to Metrics.cacheLookupCount().
      Specified by:
      cacheHitCount in interface Metrics
      Returns:
      cache hit count
    • __metaAttributes

      public static Map<String,Map<String,Object>> __metaAttributes()
      The map of meta attributes describing each element of this type.
      Returns:
      the map of meta attributes using the key being the attribute name
    • toString

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

      protected String toStringInner()
      Produces the inner portion of the toString() output (i.e., what is between the parens).
      Returns:
      portion of the toString output
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object another)
      Overrides:
      equals in class Object
    • visitAttributes

      public <T> void visitAttributes(AttributeVisitor<T> visitor, T userDefinedCtx)
      Visits all attributes of io.helidon.pico.api.Metrics, calling the AttributeVisitor for each.
      Type Parameters:
      T - type of the user defined context
      Parameters:
      visitor - the visitor called for each attribute
      userDefinedCtx - any object you wish to pass to each visit call