Ensure the given argument is a valid distribution interval.
 @param interval [Symbol]
 @raise Wavefront::Exception::InvalidDistributionInterval if the
   interval is not valid
342794
def wf_distribution_interval?(interval)
      return true if %i[m h d].include?(interval)
      raise Wavefront::Exception::InvalidDistributionInterval
    end
499788
public static Interval reverseOrder(Interval i) {
		return new Interval(i.getLabel(), i.getQuality(), (byte) -i.getDirection());
	}
1268814
public void addTimeInterval(T interval){
		timeIntervals.add(interval);
		minBorders.setStart(Math.max(minBorders.getStart(), interval.getStart()));
		minBorders.setEnd(Math.min(minBorders.getEnd(), interval.getEnd()));
		if(maxBorders == null){
			maxBorders = interval.clone();
		} else {
			maxBorders.setStart(Math.min(maxBorders.getStart(), interval.getStart()));
			maxBorders.setEnd(Math.max(maxBorders.getEnd(), interval.getEnd()));
		}
	}
697030
public static ClockInterval from(ChronoInterval<PlainTime> interval) {

        if (interval instanceof ClockInterval) {
            return ClockInterval.class.cast(interval);
        } else {
            return new ClockInterval(interval.getStart(), interval.getEnd());
        }

    }
801082
private int compareIntervals(Interval<K> i1, Interval<K> i2) {
      int res1 = compare(i1.up, i2.low);
      if (res1 < 0 || res1 <= 0 && (!i1.includeUpper || !i2.includeLower)) {
         return -1;
      }
      int res2 = compare(i2.up, i1.low);
      if (res2 < 0 || res2 <= 0 && (!i2.includeUpper || !i1.includeLower)) {
         return 1;
      }
      return 0;
   }
742789
def min_values(args):
    
    return Interval(min(x.low for x in args), min(x.high for x in args))
976954
def refresh_interval(self, refresh_interval):
        
        if isinstance(refresh_interval, int) and refresh_interval > 0:
            self._refresh_interval = refresh_interval
        else:
            self._refresh_interval = None
183247
public function setUpdateCheck($interval)
    {
        $validIntervals = [
            Checker::ALWAYS,
            Checker::DAILY,
            Checker::WEEKLY,
            Checker::MONTHLY,
            Checker::NEVER,
        ];

        if (!\in_array($interval, $validIntervals)) {
            throw new \InvalidArgumentException('invalid update check interval: ' . $interval);
        }

        $this->updateCheck = $interval;
    }
1202298
def calculated_intervals(self, intervals):
        
        if len(intervals) > 1:
            raise ValueError("Only single calculated interval valid for AssetStream")
        super(AssetStream, self.__class__).calculated_intervals.fset(self, intervals)
1189172
def execute_until_false(method, interval_s):  # pylint: disable=invalid-name
  
  interval = Interval(method, stop_if_false=True)
  interval.start(interval_s)
  return interval
29621
public void setInterval(ReadableInterval interval) {
        if (interval == null) {
            throw new IllegalArgumentException("Interval must not be null");
        }
        long startMillis = interval.getStartMillis();
        long endMillis = interval.getEndMillis();
        Chronology chrono = interval.getChronology();
        super.setInterval(startMillis, endMillis, chrono);
    }
876898
protected function setAndVerify($value, $interval)
    {
        if (!filter_var($value, FILTER_VALIDATE_INT) && $value != '0') {
            throw new InvalidArgumentException(sprintf("The %s should be an integer.", $interval));
        }
        $this->$interval = $value;
    }
1168604
def wf_distribution_count?(count)
      return true if count.is_a?(Integer) && count.positive?
      raise Wavefront::Exception::InvalidDistributionCount
    end
1167747
def checkpoint(self, interval):
        
        self.is_checkpointed = True
        self._jdstream.checkpoint(self._ssc._jduration(interval))
        return self
525483
def interval(self, interval, queue_id, queue_type='default'):
        
        # validate all the input
        if not is_valid_interval(interval):
            raise BadArgumentException('`interval` has an invalid value.')

        if not is_valid_identifier(queue_id):
            raise BadArgumentException('`queue_id` has an invalid value.')

        if not is_valid_identifier(queue_type):
            raise BadArgumentException('`queue_type` has an invalid value.')

        # generate the interval key
        interval_hmap_key = '%s:interval' % self._key_prefix
        interval_queue_key = '%s:%s' % (queue_type, queue_id)
        keys = [
            interval_hmap_key,
            interval_queue_key
        ]

        args = [
            interval
        ]
        interval_response = self._lua_interval(keys=keys, args=args)
        if interval_response == 0:
            # the queue with the id and type does not exist.
            response = {
                'status': 'failure'
            }
        else:
            response = {
                'status': 'success'
            }

        return response
1070933
private boolean containsInterval(Interval i) {
        if (i != null) {
            return directedGraph.contains(i.getStart())
                    && directedGraph.contains(i.getFinish());
        } else {
            return false;
        }
    }
831216
public BaseWindowedBolt withWatermarkInterval(Duration interval) {
    if (interval == null) {
      throw new IllegalArgumentException("Watermark interval cannot be set null");
    }
    if (interval.isNegative() || interval.isZero()) {
      throw new IllegalArgumentException("Watermark interval must be positive [" + interval + "]");
    }
    windowConfiguration.put(WindowingConfigs.TOPOLOGY_BOLTS_WATERMARK_EVENT_INTERVAL_MS,
        interval.toMillis());
    return this;
  }