java.lang.Object
org.graylog.plugins.pipelineprocessor.ast.Rule

public abstract class Rule extends Object
  • Constructor Details

    • Rule

      public Rule()
  • Method Details

    • id

      @Nullable public abstract String id()
    • name

      public abstract String name()
    • when

      public abstract LogicalExpression when()
    • then

      public abstract Collection<Statement> then()
    • builder

      public static Rule.Builder builder()
    • toBuilder

      public abstract Rule.Builder toBuilder()
    • withId

      public Rule withId(String id)
    • alwaysFalse

      public static Rule alwaysFalse(String name)
    • registerMetrics

      public void registerMetrics(com.codahale.metrics.MetricRegistry metricRegistry, String pipelineId, String stageId)
      Register the metrics attached to this pipeline.
      Parameters:
      metricRegistry - the registry to add the metrics to
    • metricsFilter

      public com.codahale.metrics.MetricFilter metricsFilter()
      The metric filter matching all metrics that have been registered by this pipeline. Commonly used to remove the relevant metrics from the registry upon deletion of the pipeline.
      Returns:
      the filter matching this pipeline's metrics
    • markExecution

      public void markExecution()
    • markMatch

      public void markMatch()
    • markNonMatch

      public void markNonMatch()
    • markFailure

      public void markFailure()
    • copy

      public Rule copy()
      Creates a copy of this Rule.
      Returns:
      a copy of this rule
    • toString

      public String toString()
      Overrides:
      toString in class Object