Class SolrMetricManager.PrefixFilter

  • All Implemented Interfaces:
    com.codahale.metrics.MetricFilter
    Enclosing class:
    SolrMetricManager

    public static class SolrMetricManager.PrefixFilter
    extends Object
    implements com.codahale.metrics.MetricFilter
    An implementation of MetricFilter that selects metrics with names that start with one of prefixes.
    • Constructor Detail

      • PrefixFilter

        public PrefixFilter​(String... prefixes)
        Create a filter that uses the provided prefixes.
        Parameters:
        prefixes - prefixes to use, must not be null. If empty then any name will match, if not empty then match on any prefix will succeed (logical OR).
    • Method Detail

      • matches

        public boolean matches​(String name,
                               com.codahale.metrics.Metric metric)
        Specified by:
        matches in interface com.codahale.metrics.MetricFilter
      • getMatched

        public Set<String> getMatched()
        Return the set of names that matched this filter.
        Returns:
        matching names
      • reset

        public void reset()
        Clear the set of names that matched.