java.lang.Object
com.zeroc.IceMX.MetricsHelper<T>
- Type Parameters:
T- the metrics type
Helper class for metrics operations.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classResolves attribute values from metrics objects. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMetricsHelper(MetricsHelper.AttributeResolver attributes) Constructs a MetricsHelper with the specified attribute resolver. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringdefaultResolve(String attribute) Provides default resolution for unknown attributes.voidinitMetrics(T metrics) Initializes the metrics object.Resolves an attribute value.
-
Constructor Details
-
MetricsHelper
Constructs a MetricsHelper with the specified attribute resolver.- Parameters:
attributes- the attribute resolver to use
-
-
Method Details
-
resolve
Resolves an attribute value.- Parameters:
attribute- the attribute name to resolve- Returns:
- the resolved attribute value
- Throws:
IllegalArgumentException- if the attribute is unknown
-
initMetrics
Initializes the metrics object.- Parameters:
metrics- the metrics object to initialize
-
defaultResolve
Provides default resolution for unknown attributes.- Parameters:
attribute- the attribute name- Returns:
- the default value, or null if no default is available
-