|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jetspeed.scheduler.BaseJobEntry
org.apache.jetspeed.scheduler.JobEntry
public class JobEntry
This is a wrapper for a scheduled job. It is modeled after the Unix scheduler cron.
Field Summary | |
---|---|
private static int |
DAILY
|
private static int |
DAY_OF_MONTH
|
private boolean |
jobIsActive
indicates if job is currently running |
private static int |
MINUTE
|
private long |
runtime
Next runtime. |
private static int |
SECOND
schedule types |
private static int |
WEEK_DAY
|
Fields inherited from class org.apache.jetspeed.scheduler.BaseJobEntry |
---|
dayOfMonth, email, jobHour, jobId, jobMinute, jobSecond, task, weekDay |
Constructor Summary | |
---|---|
JobEntry()
default constructor |
|
JobEntry(int sec,
int min,
int hour,
int wd,
int day_mo,
String task)
Constuctor. |
Method Summary | |
---|---|
void |
calcRunTime()
Calculate how long before the next runtime. The runtime determines it's position in the job queue. |
int |
compareTo(Object je)
Compares one JobEntry to another JobEntry based on the JobId |
private int |
evaluateJobType()
What schedule am I on? I know this is kinda ugly! If you can think of a cleaner way to do this, please jump in! |
String |
getNextRunAsString()
Get the next runtime for this job as a String. |
long |
getNextRuntime()
Get the next runtime for this job as a long. |
boolean |
isActive()
Check to see if job is currently active/running |
void |
setActive(boolean isActive)
Sets whether the job is running. |
Methods inherited from class org.apache.jetspeed.scheduler.BaseJobEntry |
---|
getDayOfMonth, getEmail, getHour, getJobId, getMinute, getSecond, getTask, getWeekDay, setDayOfMonth, setEmail, setHour, setJobId, setMinute, setSecond, setTask, setWeekDay |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private boolean jobIsActive
private long runtime
private static final int SECOND
private static final int MINUTE
private static final int WEEK_DAY
private static final int DAY_OF_MONTH
private static final int DAILY
Constructor Detail |
---|
public JobEntry()
public JobEntry(int sec, int min, int hour, int wd, int day_mo, String task) throws Exception
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.
Exception,
- a generic exception.
Exception
Method Detail |
---|
public int compareTo(Object je)
compareTo
in interface Comparable
public void setActive(boolean isActive)
isActive
- Whether the job is running.public boolean isActive()
public long getNextRuntime()
public String getNextRunAsString()
public void calcRunTime() throws Exception
Exception,
- a generic exception.
Exception
private int evaluateJobType() throws Exception
Exception,
- a generic exception.
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |