Class JobEntryNonPersistent
- java.lang.Object
-
- org.apache.turbine.services.schedule.AbstractJobEntry
-
- org.apache.turbine.services.schedule.JobEntryNonPersistent
-
- All Implemented Interfaces:
Comparable<JobEntry>
,JobEntry
public class JobEntryNonPersistent extends AbstractJobEntry
This is an implementation of a JobEntry with no persistence. It is used by theTurbineNonPersistentSchedulerService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.turbine.services.schedule.AbstractJobEntry
AbstractJobEntry.ScheduleType
-
-
Field Summary
-
Fields inherited from class org.apache.turbine.services.schedule.AbstractJobEntry
log
-
-
Constructor Summary
Constructors Constructor Description JobEntryNonPersistent()
Default constructorJobEntryNonPersistent(int sec, int min, int hour, int wd, int day_mo, String task)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
int
getDayOfMonth()
Get the value of dayOfMonth.int
getHour()
Get the value of hour.int
getJobId()
Get the value of jobId.int
getMinute()
Get the value of minute.int
getSecond()
Get the value of second.String
getTask()
Get the value of task.int
getWeekDay()
Get the value of weekDay.int
hashCode()
boolean
isNew()
Return true, if the entry is not yet persistedvoid
setDayOfMonth(int v)
Set the value of dayOfMonth.void
setHour(int v)
Set the value of hour.void
setJobId(int v)
Set the value of jobId.void
setMinute(int v)
Set the value of minute.void
setSecond(int v)
Set the value of second.void
setTask(String v)
Set the value of task.void
setWeekDay(int v)
Set the value of weekDay.-
Methods inherited from class org.apache.turbine.services.schedule.AbstractJobEntry
calcRunTime, compareTo, getNextRunAsString, getNextRunDate, getNextRuntime, isActive, setActive
-
-
-
-
Constructor Detail
-
JobEntryNonPersistent
public JobEntryNonPersistent()
Default constructor
-
JobEntryNonPersistent
public 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 Detail
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classObject
- See Also:
Object.hashCode()
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classObject
- See Also:
Object.equals(java.lang.Object)
-
isNew
public boolean isNew()
Return true, if the entry is not yet persisted- Returns:
- true if job is not yet saved, otherwise false
-
getJobId
public int getJobId()
Get the value of jobId.- Specified by:
getJobId
in interfaceJobEntry
- Specified by:
getJobId
in classAbstractJobEntry
- Returns:
- int
-
setJobId
public void setJobId(int v)
Set the value of jobId.- Specified by:
setJobId
in interfaceJobEntry
- Specified by:
setJobId
in classAbstractJobEntry
- Parameters:
v
- new value
-
getSecond
public int getSecond()
Get the value of second.- Specified by:
getSecond
in classAbstractJobEntry
- Returns:
- int
-
setSecond
public void setSecond(int v)
Set the value of second.- Specified by:
setSecond
in classAbstractJobEntry
- Parameters:
v
- new value
-
getMinute
public int getMinute()
Get the value of minute.- Specified by:
getMinute
in classAbstractJobEntry
- Returns:
- int
-
setMinute
public void setMinute(int v)
Set the value of minute.- Specified by:
setMinute
in classAbstractJobEntry
- Parameters:
v
- new value
-
getHour
public int getHour()
Get the value of hour.- Specified by:
getHour
in classAbstractJobEntry
- Returns:
- int
-
setHour
public void setHour(int v)
Set the value of hour.- Specified by:
setHour
in classAbstractJobEntry
- Parameters:
v
- new value
-
getWeekDay
public int getWeekDay()
Get the value of weekDay.- Specified by:
getWeekDay
in classAbstractJobEntry
- Returns:
- int
-
setWeekDay
public void setWeekDay(int v)
Set the value of weekDay.- Specified by:
setWeekDay
in classAbstractJobEntry
- Parameters:
v
- new value
-
getDayOfMonth
public int getDayOfMonth()
Get the value of dayOfMonth.- Specified by:
getDayOfMonth
in classAbstractJobEntry
- Returns:
- int
-
setDayOfMonth
public void setDayOfMonth(int v)
Set the value of dayOfMonth.- Specified by:
setDayOfMonth
in classAbstractJobEntry
- Parameters:
v
- new value
-
getTask
public String getTask()
Get the value of task.- Specified by:
getTask
in interfaceJobEntry
- Specified by:
getTask
in classAbstractJobEntry
- Returns:
- String
-
-