Class MinThreshold
java.lang.Object
org.apache.cassandra.db.guardrails.Guardrail
org.apache.cassandra.db.guardrails.Threshold
org.apache.cassandra.db.guardrails.MinThreshold
MinThreshold for minimum guardrails, the value is checked to see if it is lesser than the warn and fail thresholds.-
Field Summary
Fields inherited from class org.apache.cassandra.db.guardrails.Threshold
failThreshold, messageProvider, warnThreshold -
Constructor Summary
ConstructorsConstructorDescriptionMinThreshold(String name, String reason, ToLongFunction<ClientState> warnThreshold, ToLongFunction<ClientState> failThreshold, org.apache.cassandra.db.guardrails.Threshold.ErrorMessageProvider messageProvider) Creates a new minimum threshold guardrail. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancompare(long value, long threshold) protected longfailValue(ClientState state) protected longwarnValue(ClientState state) Methods inherited from class org.apache.cassandra.db.guardrails.Threshold
enabled, errMsg, failsOn, guard, triggersOn, warnsOn
-
Constructor Details
-
MinThreshold
public MinThreshold(String name, @Nullable String reason, ToLongFunction<ClientState> warnThreshold, ToLongFunction<ClientState> failThreshold, org.apache.cassandra.db.guardrails.Threshold.ErrorMessageProvider messageProvider) Creates a new minimum threshold guardrail.- Parameters:
name- the identifying name of the guardrailreason- the optional description of the reason for guarding the operationwarnThreshold- aClientState-based provider of the value above which a warning should be triggered.failThreshold- aClientState-based provider of the value above which the operation should be aborted.messageProvider- a function to generate the warning or error message if the guardrail is triggered
-
-
Method Details