Module io.helidon.pico.api
Package io.helidon.pico.api
Class AbstractMetrics.Builder<B extends AbstractMetrics.Builder<B,T>,T extends Metrics>
java.lang.Object
io.helidon.pico.api.AbstractMetrics.Builder<B,T>
- Type Parameters:
B- the type of the builderT- the type of the built instance
- Direct Known Subclasses:
DefaultMetrics.Builder
- Enclosing class:
AbstractMetrics
public abstract static class AbstractMetrics.Builder<B extends AbstractMetrics.Builder<B,T>,T extends Metrics>
extends Object
implements Metrics, Builder<B,T>
Fluent API builder for
T.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAccept and update from the provided value object.The total number ofServices:lookup()calls that were successfully resolved via cache.cacheHitCount(Integer val) Setter for 'cacheHitCount'.cacheHitCount(Optional<Integer> val) Setter for 'cacheHitCount'.The total number ofServices::lookup()calls that were attempted against the lookup cache.cacheLookupCount(Integer val) Setter for 'cacheLookupCount'.cacheLookupCount(Optional<Integer> val) Setter for 'cacheLookupCount'.The total number ofServices::lookup()calls since jvm start, or since last reset.lookupCount(Integer val) Setter for 'lookupCount'.lookupCount(Optional<Integer> val) Setter for 'lookupCount'.The total service count in the registry.serviceCount(Integer val) Setter for 'serviceCount'.serviceCount(Optional<Integer> val) Setter for 'serviceCount'.<T> voidvisitAttributes(AttributeVisitor<T> visitor, T userDefinedCtx) Visits all attributes of io.helidon.pico.api.Metrics, calling theAttributeVisitorfor each.
-
Constructor Details
-
Builder
protected Builder()Fluent API builder constructor.
-
-
Method Details
-
serviceCount
Description copied from interface:MetricsThe total service count in the registry.- Specified by:
serviceCountin interfaceMetrics- Returns:
- total service count
-
lookupCount
Description copied from interface:MetricsThe total number ofServices::lookup()calls since jvm start, or since last reset.- Specified by:
lookupCountin interfaceMetrics- Returns:
- lookup count
-
cacheLookupCount
Description copied from interface:MetricsThe total number ofServices::lookup()calls that were attempted against the lookup cache. This will be empty if caching is disabled.- Specified by:
cacheLookupCountin interfaceMetrics- Returns:
- cache lookup count
- See Also:
-
cacheHitCount
Description copied from interface:MetricsThe total number ofServices:lookup()calls that were successfully resolved via cache. This will be a value less than or equal toMetrics.cacheLookupCount().- Specified by:
cacheHitCountin interfaceMetrics- Returns:
- cache hit count
-
serviceCount
Setter for 'serviceCount'.- Parameters:
val- the new value- Returns:
- this fluent builder
-
serviceCount
Setter for 'serviceCount'.- Parameters:
val- the new value- Returns:
- this fluent builder
-
lookupCount
Setter for 'lookupCount'.- Parameters:
val- the new value- Returns:
- this fluent builder
-
lookupCount
Setter for 'lookupCount'.- Parameters:
val- the new value- Returns:
- this fluent builder
-
cacheLookupCount
Setter for 'cacheLookupCount'.- Parameters:
val- the new value- Returns:
- this fluent builder
-
cacheLookupCount
Setter for 'cacheLookupCount'.- Parameters:
val- the new value- Returns:
- this fluent builder
-
cacheHitCount
Setter for 'cacheHitCount'.- Parameters:
val- the new value- Returns:
- this fluent builder
-
cacheHitCount
Setter for 'cacheHitCount'.- Parameters:
val- the new value- Returns:
- this fluent builder
-
accept
Accept and update from the provided value object.- Parameters:
val- the value object to copy from- Returns:
- this instance typed to correct type
-
visitAttributes
Visits all attributes of io.helidon.pico.api.Metrics, calling theAttributeVisitorfor each.- Type Parameters:
T- type of the user defined context- Parameters:
visitor- the visitor called for each attributeuserDefinedCtx- any object you wish to pass to each visit call
-