Class Predicates<T>

java.lang.Object
org.apache.cassandra.db.guardrails.Guardrail
org.apache.cassandra.db.guardrails.Predicates<T>
Type Parameters:
T - the type of the values to be tested against predicates.

public class Predicates<T> extends Guardrail
A guardrail based on two predicates.

A Predicates guardrail defines (up to) 2 predicates, one at which a warning is issued, and another one at which a failure is triggered. If failure is triggered, warning is skipped.

  • Method Details

    • guard

      public void guard(T value, @Nullable ClientState state)
      Apply the guardrail to the provided value, triggering a warning or failure if appropriate.
      Parameters:
      value - the value to check.