Record Class MetricsAggregator.AggregationRule
java.lang.Object
java.lang.Record
com.loomcache.server.metrics.MetricsAggregator.AggregationRule
- Record Components:
pattern- Regex pattern for metric nameaggregatedName- Target aggregated metric nametype- SUM, AVG, MAX, MIN, etc.stripLabels- Labels to remove during aggregation
- Enclosing class:
MetricsAggregator
-
Constructor Summary
ConstructorsConstructorDescriptionAggregationRule(String pattern, String aggregatedName, MetricsAggregator.AggregationType type, @Nullable List<String> stripLabels) Creates a new AggregationRule. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaggregatedNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.pattern()Returns the value of thepatternrecord component.Returns the value of thestripLabelsrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
AggregationRule
public AggregationRule(String pattern, String aggregatedName, MetricsAggregator.AggregationType type, @Nullable List<String> stripLabels) Creates a new AggregationRule.- Parameters:
pattern- the regex pattern for matching metric names (must not be null)aggregatedName- the target aggregated metric name (must not be null)type- the aggregation type (must not be null)stripLabels- the labels to strip during aggregation (may be null)- Throws:
NullPointerException- if pattern, aggregatedName, or type is null
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
pattern
-
aggregatedName
Returns the value of theaggregatedNamerecord component.- Returns:
- the value of the
aggregatedNamerecord component
-
type
-
stripLabels
Returns the value of thestripLabelsrecord component.- Returns:
- the value of the
stripLabelsrecord component
-