Class FixedPeriodJobTrigger
- java.lang.Object
-
- org.silverpeas.core.scheduler.trigger.JobTrigger
-
- org.silverpeas.core.scheduler.trigger.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 Summary
Constructors Modifier Constructor Description protected
FixedPeriodJobTrigger(int time, TimeUnit unit)
Creates a new job trigger that will fire a job execution at a specified interval.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(JobTriggerVisitor visitor)
Accepts the specified visitor to visit it.int
getTimeInterval()
Gets the interval in time between two job triggerings.long
getTimeIntervalInMillis()
Gets the interval in milliseconds between two job triggerings.TimeUnit
getTimeUnit()
Gets the unit of the interval of time between two job triggerings.-
Methods inherited from class org.silverpeas.core.scheduler.trigger.JobTrigger
getStartDate, startAt, triggerAt, triggerAt, triggerEvery
-
-
-
-
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 classJobTrigger
- Parameters:
visitor
- the visitor to accept.
-
-