Class FixedPeriodJobTrigger


  • public final class FixedPeriodJobTrigger
    extends JobTrigger
    A job trigger that fires repeatedly the execution of a job at a specified interval. The first job firing will be triggered at the specified interval of time after now.
    • Constructor Detail

      • FixedPeriodJobTrigger

        protected FixedPeriodJobTrigger​(int time,
                                        TimeUnit unit)
        Creates a new job trigger that will fire a job execution at a specified interval.
        Parameters:
        time - the interval in the time between each job triggering.
        unit - the unit in which the time is expressed.
    • Method Detail

      • getTimeInterval

        public int getTimeInterval()
        Gets the interval in time between two job triggerings.
        Returns:
        the time interval.
      • getTimeIntervalInMillis

        public long getTimeIntervalInMillis()
        Gets the interval in milliseconds between two job triggerings.
        Returns:
        the time interval.
      • getTimeUnit

        public TimeUnit getTimeUnit()
        Gets the unit of the interval of time between two job triggerings.
        Returns:
        the temporal unit in which is expressed the firing time of this trigger.
      • accept

        public void accept​(JobTriggerVisitor visitor)
        Description copied from class: JobTrigger
        Accepts the specified visitor to visit it. See the Visitor pattern.
        Specified by:
        accept in class JobTrigger
        Parameters:
        visitor - the visitor to accept.