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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Predicates.MessageProvider<T>
A function used to build the warning or error message of a triggeredPredicates
guardrail.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
guard(T value, ClientState state)
Apply the guardrail to the provided value, triggering a warning or failure if appropriate.
-
-
-
Method Detail
-
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.
-
-