Class CronExpressionIntervalSupplier

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getNextInterval​(long mPreviousTickedMs, long nowTimeStampMillis)
      Gets the next interval for sleeping.
      long getRunLimit​(long mPreviousTickedMs)
      Gets the run limit from previous ticked.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CronExpressionIntervalSupplier

        public CronExpressionIntervalSupplier​(org.apache.logging.log4j.core.util.CronExpression cronExpression,
                                              long fixedInterval)
        Parameters:
        cronExpression - the cron expression
        fixedInterval - the fixed interval
    • Method Detail

      • getNextInterval

        public long getNextInterval​(long mPreviousTickedMs,
                                    long nowTimeStampMillis)
        Description copied from interface: SleepIntervalSupplier
        Gets the next interval for sleeping.
        Specified by:
        getNextInterval in interface SleepIntervalSupplier
        Parameters:
        mPreviousTickedMs - previous ticked time stamp in millisecond
        nowTimeStampMillis - current time stamp in millisecond
        Returns:
        the interval to sleep starting from now before next time the timer triggers
      • getRunLimit

        public long getRunLimit​(long mPreviousTickedMs)
        Description copied from interface: SleepIntervalSupplier
        Gets the run limit from previous ticked.
        Specified by:
        getRunLimit in interface SleepIntervalSupplier
        Parameters:
        mPreviousTickedMs - previous ticked time stamp in millisecond
        Returns:
        the run limit