Package io.confluent.telemetry.config
Class FilterSetPredicate
java.lang.Object
io.confluent.telemetry.config.FilterSetPredicate
A grouping of unique
NamedPredicates to be applied to an
Exporter.
For ease of usage, it provides a Predicate interface, which operates as a logical
OR of all filters in this set.
It also provides set-like operation to merge FilterSetPredicate and extract a subset of it.
For the scope of this class, a NamedPredicate is identified only by its name.-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic FilterSetPredicatefromNamedFilter(io.confluent.telemetry.config.v2.NamedFilter filter) static FilterSetPredicatefromNamedFilter(Set<io.confluent.telemetry.config.v2.NamedFilter> filters) inthashCode()Returns a new FilterSetPredicate containing only the NamedFilters with the given names.booleanWe avoid the streams abstraction here for performance reasons since this will be called on every metric for every predicate.union(FilterSetPredicate other) Creates a newFilterSetPredicatecontaining all theNamedFilters from this object, plus anyNamedFilters from theotherset that is not contained the currentNamedFilterSet.
-
Method Details
-
fromNamedFilter
public static FilterSetPredicate fromNamedFilter(io.confluent.telemetry.config.v2.NamedFilter filter) -
fromNamedFilter
public static FilterSetPredicate fromNamedFilter(Set<io.confluent.telemetry.config.v2.NamedFilter> filters) -
subset
Returns a new FilterSetPredicate containing only the NamedFilters with the given names. It throws aNoSuchElementExceptionif thefilterNamescontains any name that isn't defined in this FilterSetPredicate -
union
Creates a newFilterSetPredicatecontaining all theNamedFilters from this object, plus anyNamedFilters from theotherset that is not contained the currentNamedFilterSet. -
test
We avoid the streams abstraction here for performance reasons since this will be called on every metric for every predicate. -
equals
-
hashCode
public int hashCode()
-