Class MaxThreshold

  • Direct Known Subclasses:
    PercentageThreshold

    public class MaxThreshold
    extends Threshold
    MaxThreshold for maximum guardrails, the value is checked to see if it is greater than the warn and fail thresholds.
    • Constructor Detail

      • MaxThreshold

        public MaxThreshold​(java.lang.String name,
                            @Nullable
                            java.lang.String reason,
                            java.util.function.ToLongFunction<ClientState> warnThreshold,
                            java.util.function.ToLongFunction<ClientState> failThreshold,
                            org.apache.cassandra.db.guardrails.Threshold.ErrorMessageProvider messageProvider)
        Creates a new threshold guardrail.
        Parameters:
        name - the identifying name of the guardrail
        reason - the optional description of the reason for guarding the operation
        warnThreshold - a ClientState-based provider of the value above which a warning should be triggered.
        failThreshold - a ClientState-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