Class JobEntryNonPersistent
java.lang.Object
org.apache.turbine.services.schedule.AbstractJobEntry
org.apache.turbine.services.schedule.JobEntryNonPersistent
- All Implemented Interfaces:
- Comparable<JobEntry>,- JobEntry
This is an implementation of a JobEntry with no persistence. It is used by the
 
TurbineNonPersistentSchedulerService- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.turbine.services.schedule.AbstractJobEntryAbstractJobEntry.ScheduleType
- 
Field SummaryFields inherited from class org.apache.turbine.services.schedule.AbstractJobEntrylog
- 
Constructor SummaryConstructorsConstructorDescriptionDefault constructorJobEntryNonPersistent(int sec, int min, int hour, int wd, int day_mo, String task) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanintGet the value of dayOfMonth.intgetHour()Get the value of hour.intgetJobId()Get the value of jobId.intGet the value of minute.intGet the value of second.getTask()Get the value of task.intGet the value of weekDay.inthashCode()booleanisNew()Return true, if the entry is not yet persistedvoidsetDayOfMonth(int v) Set the value of dayOfMonth.voidsetHour(int v) Set the value of hour.voidsetJobId(int v) Set the value of jobId.voidsetMinute(int v) Set the value of minute.voidsetSecond(int v) Set the value of second.voidSet the value of task.voidsetWeekDay(int v) Set the value of weekDay.Methods inherited from class org.apache.turbine.services.schedule.AbstractJobEntrycalcRunTime, compareTo, getNextRunAsString, getNextRunDate, getNextRuntime, isActive, setActive
- 
Constructor Details- 
JobEntryNonPersistentpublic JobEntryNonPersistent()Default constructor
- 
JobEntryNonPersistentpublic JobEntryNonPersistent(int sec, int min, int hour, int wd, int day_mo, String task) throws TurbineException Constructor. Schedule a job to run on a certain point of time.
 Example 1: Run the DefaultScheduledJob at 8:00am every 15th of the month -
 JobEntry je = new JobEntry(0,0,8,15,"DefaultScheduledJob");
 Example 2: Run the DefaultScheduledJob at 8:00am every day -
 JobEntry je = new JobEntry(0,0,8,-1,"DefaultScheduledJob");
 Example 3: Run the DefaultScheduledJob every 2 hours. -
 JobEntry je = new JobEntry(0,120,-1,-1,"DefaultScheduledJob");
 Example 4: Run the DefaultScheduledJob every 30 seconds. -
 JobEntry je = new JobEntry(30,-1,-1,-1,"DefaultScheduledJob");- Parameters:
- sec- Value for entry "seconds".
- min- Value for entry "minutes".
- hour- Value for entry "hours".
- wd- Value for entry "week days".
- day_mo- Value for entry "month days".
- task- Task to execute.
- Throws:
- TurbineException- a generic exception.
 
 
- 
- 
Method Details- 
hashCode
- 
equals
- 
isNewReturn true, if the entry is not yet persisted- Returns:
- true if job is not yet saved, otherwise false
 
- 
getJobIdGet the value of jobId.- Specified by:
- getJobIdin interface- JobEntry
- Specified by:
- getJobIdin class- AbstractJobEntry
- Returns:
- int
 
- 
setJobIdSet the value of jobId.- Specified by:
- setJobIdin interface- JobEntry
- Specified by:
- setJobIdin class- AbstractJobEntry
- Parameters:
- v- new value
 
- 
getSecondGet the value of second.- Specified by:
- getSecondin class- AbstractJobEntry
- Returns:
- int
 
- 
setSecondSet the value of second.- Specified by:
- setSecondin class- AbstractJobEntry
- Parameters:
- v- new value
 
- 
getMinuteGet the value of minute.- Specified by:
- getMinutein class- AbstractJobEntry
- Returns:
- int
 
- 
setMinuteSet the value of minute.- Specified by:
- setMinutein class- AbstractJobEntry
- Parameters:
- v- new value
 
- 
getHourGet the value of hour.- Specified by:
- getHourin class- AbstractJobEntry
- Returns:
- int
 
- 
setHourSet the value of hour.- Specified by:
- setHourin class- AbstractJobEntry
- Parameters:
- v- new value
 
- 
getWeekDayGet the value of weekDay.- Specified by:
- getWeekDayin class- AbstractJobEntry
- Returns:
- int
 
- 
setWeekDaySet the value of weekDay.- Specified by:
- setWeekDayin class- AbstractJobEntry
- Parameters:
- v- new value
 
- 
getDayOfMonthGet the value of dayOfMonth.- Specified by:
- getDayOfMonthin class- AbstractJobEntry
- Returns:
- int
 
- 
setDayOfMonthSet the value of dayOfMonth.- Specified by:
- setDayOfMonthin class- AbstractJobEntry
- Parameters:
- v- new value
 
- 
getTaskGet the value of task.- Specified by:
- getTaskin interface- JobEntry
- Specified by:
- getTaskin class- AbstractJobEntry
- Returns:
- String
 
- 
setTaskSet the value of task.- Specified by:
- setTaskin interface- JobEntry
- Specified by:
- setTaskin class- AbstractJobEntry
- Parameters:
- v- new value
 
 
-