Package org.drools.core.time.impl
Class IntervalTrigger
- java.lang.Object
-
- org.drools.core.time.impl.IntervalTrigger
-
- All Implemented Interfaces:
java.io.Serializable,Trigger
public class IntervalTrigger extends java.lang.Object implements Trigger
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IntervalTrigger()IntervalTrigger(long timestamp, java.util.Date startTime, java.util.Date endTime, int repeatLimit, long delay, long period, java.lang.String[] calendarNames, org.kie.api.runtime.Calendars calendars)IntervalTrigger(long timestamp, java.util.Date startTime, java.util.Date endTime, int repeatLimit, long delay, long period, java.lang.String[] calendarNames, org.kie.api.runtime.Calendars calendars, java.util.Date createdTime, java.util.Date lastFireTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]getCalendarNames()org.kie.api.runtime.CalendarsgetCalendars()java.util.DategetCreatedTime()java.util.DategetEndTime()Get the time at which theCronTriggershould quit repeating - even if repeastCount isn't yet satisfied.java.util.DategetLastFireTime()java.util.DategetNextFireTime()longgetPeriod()intgetRepeatCount()intgetRepeatLimit()java.util.DategetStartTime()java.util.DatehasNextFireTime()This method is used to query the trigger about the existence of a possible next fire time, but WITHOUT changing any internal state of the trigger.java.util.DatenextFireTime()This method returns the date of the next fire time and updates the internal state of the Trigger to the following fire time if one exists.voidreadExternal(java.io.ObjectInput in)voidsetCalendarNames(java.lang.String[] calendarNames)voidsetCalendars(org.kie.api.runtime.Calendars calendars)voidsetEndTime(java.util.Date endTime)voidsetNextFireTime(java.util.Date nextFireTime)voidsetPeriod(long period)voidsetRepeatCount(int repeatCount)voidsetRepeatLimit(int repeatLimit)voidsetStartTime(java.util.Date startTime)java.lang.StringtoString()voidupdateToNextIncludeDate()voidwriteExternal(java.io.ObjectOutput out)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.drools.core.time.Trigger
initialize
-
-
-
-
Constructor Detail
-
IntervalTrigger
public IntervalTrigger()
-
IntervalTrigger
public IntervalTrigger(long timestamp, java.util.Date startTime, java.util.Date endTime, int repeatLimit, long delay, long period, java.lang.String[] calendarNames, org.kie.api.runtime.Calendars calendars)
-
IntervalTrigger
public IntervalTrigger(long timestamp, java.util.Date startTime, java.util.Date endTime, int repeatLimit, long delay, long period, java.lang.String[] calendarNames, org.kie.api.runtime.Calendars calendars, java.util.Date createdTime, java.util.Date lastFireTime)
-
-
Method Detail
-
getRepeatLimit
public int getRepeatLimit()
-
getRepeatCount
public int getRepeatCount()
-
getNextFireTime
public java.util.Date getNextFireTime()
-
getPeriod
public long getPeriod()
-
getCalendarNames
public java.lang.String[] getCalendarNames()
-
getCalendars
public org.kie.api.runtime.Calendars getCalendars()
-
getStartTime
public java.util.Date getStartTime()
-
setStartTime
public void setStartTime(java.util.Date startTime)
-
getEndTime
public java.util.Date getEndTime()
Get the time at which the
CronTriggershould quit repeating - even if repeastCount isn't yet satisfied.
-
setEndTime
public void setEndTime(java.util.Date endTime)
-
getLastFireTime
public java.util.Date getLastFireTime()
-
getCreatedTime
public java.util.Date getCreatedTime()
-
hasNextFireTime
public java.util.Date hasNextFireTime()
Description copied from interface:TriggerThis method is used to query the trigger about the existence of a possible next fire time, but WITHOUT changing any internal state of the trigger. In other words, this method MUST not have side effects. As an analogy, if a trigger was a stack, this method would be the equivalent of a "peek()" call.- Specified by:
hasNextFireTimein interfaceTrigger- Returns:
- the Date of the next fire time or null if there is no next fire time.
-
nextFireTime
public java.util.Date nextFireTime()
Description copied from interface:TriggerThis method returns the date of the next fire time and updates the internal state of the Trigger to the following fire time if one exists. As an analogy, if a trigger was a stack, this method would be the equivalent of a "pop()" call.- Specified by:
nextFireTimein interfaceTrigger- Returns:
- the Date of the next fire time or null if there is no next fire time.
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Throws:
java.io.IOException
-
updateToNextIncludeDate
public void updateToNextIncludeDate()
-
setRepeatLimit
public void setRepeatLimit(int repeatLimit)
-
setRepeatCount
public void setRepeatCount(int repeatCount)
-
setNextFireTime
public void setNextFireTime(java.util.Date nextFireTime)
-
setPeriod
public void setPeriod(long period)
-
setCalendarNames
public void setCalendarNames(java.lang.String[] calendarNames)
-
setCalendars
public void setCalendars(org.kie.api.runtime.Calendars calendars)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-