com.netflix.servo.publish
Class BasicMetricFilter

java.lang.Object
  extended by com.netflix.servo.publish.BasicMetricFilter
All Implemented Interfaces:
MetricFilter

public final class BasicMetricFilter
extends java.lang.Object
implements MetricFilter

Filter that always returns true or false.


Field Summary
static MetricFilter MATCH_ALL
          Filter that matches all metrics.
static MetricFilter MATCH_NONE
          Filter that does not match any metrics.
 
Constructor Summary
BasicMetricFilter(boolean match)
          Creates a new instance with a boolean indicating whether it should always match or always fail.
 
Method Summary
 boolean matches(MonitorConfig config)
          Check if a metric with the provided configuration should be selected and sent to observers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MATCH_ALL

public static final MetricFilter MATCH_ALL
Filter that matches all metrics.


MATCH_NONE

public static final MetricFilter MATCH_NONE
Filter that does not match any metrics.

Constructor Detail

BasicMetricFilter

public BasicMetricFilter(boolean match)
Creates a new instance with a boolean indicating whether it should always match or always fail.

Parameters:
match - should this filter match?
Method Detail

matches

public boolean matches(MonitorConfig config)
Check if a metric with the provided configuration should be selected and sent to observers.

Specified by:
matches in interface MetricFilter
Parameters:
config - config settings associated with the metric
Returns:
true if the metric should be selected