Class LocationThresholdRuleCondition


  • public class LocationThresholdRuleCondition
    extends RuleCondition
    A rule condition based on a certain number of locations failing.
    • Constructor Detail

      • LocationThresholdRuleCondition

        public LocationThresholdRuleCondition()
    • Method Detail

      • windowSize

        public Duration windowSize()
        Get the windowSize property: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
        Returns:
        the windowSize value.
      • withWindowSize

        public LocationThresholdRuleCondition withWindowSize​(Duration windowSize)
        Set the windowSize property: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
        Parameters:
        windowSize - the windowSize value to set.
        Returns:
        the LocationThresholdRuleCondition object itself.
      • failedLocationCount

        public int failedLocationCount()
        Get the failedLocationCount property: the number of locations that must fail to activate the alert.
        Returns:
        the failedLocationCount value.
      • withFailedLocationCount

        public LocationThresholdRuleCondition withFailedLocationCount​(int failedLocationCount)
        Set the failedLocationCount property: the number of locations that must fail to activate the alert.
        Parameters:
        failedLocationCount - the failedLocationCount value to set.
        Returns:
        the LocationThresholdRuleCondition object itself.
      • withDataSource

        public LocationThresholdRuleCondition withDataSource​(RuleDataSource dataSource)
        Set the dataSource property: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
        Overrides:
        withDataSource in class RuleCondition
        Parameters:
        dataSource - the dataSource value to set.
        Returns:
        the RuleCondition object itself.