|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.turbine.services.schedule.JobQueue
Queue for the scheduler.
Field Summary | |
private java.util.Vector |
queue
The queue of JobEntry objects. |
Constructor Summary | |
JobQueue()
Creates a new instance. |
Method Summary | |
void |
add(JobEntry je)
Add a job to the queue. |
void |
batchLoad(java.util.List jobEntries)
Batch load jobs. |
int |
compare(java.lang.Object je1,
java.lang.Object je2)
Compare to another JobEntry . |
JobEntry |
getJob(JobEntry je)
Return a specific job. |
JobEntry |
getNext()
Return the next job off the top of the queue, or null if
there are no jobs in the queue. |
java.util.Vector |
list()
List jobs in the queue. |
void |
modify(JobEntry je)
Modify a job on the queue. |
void |
remove(JobEntry je)
Remove a job from the queue. |
private void |
sortQueue()
Re-sort the existing queue. |
void |
updateQueue(JobEntry je)
Update the job for its next run time. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.util.Vector queue
JobEntry
objects.Constructor Detail |
public JobQueue() throws java.lang.Exception
java.lang.Exception
- A generic exception.Method Detail |
public JobEntry getNext()
null
if
there are no jobs in the queue.public JobEntry getJob(JobEntry je)
je
- The JobEntry we are looking for.public java.util.Vector list()
JobEntry
objects.public void add(JobEntry je)
je
- A JobEntry job.public void batchLoad(java.util.List jobEntries)
SchedulerService
start-up.jobEntries
- A list of the JobEntry
objects to load.public void remove(JobEntry je)
je
- A JobEntry with the job to remove.public void modify(JobEntry je)
je
- A JobEntry with the job to modifypublic void updateQueue(JobEntry je) throws java.lang.Exception
je
- A JobEntry to be updated.Exception,
- a generic exception.private void sortQueue()
synchronized
.public int compare(java.lang.Object je1, java.lang.Object je2)
JobEntry
. Used by the
QuickSort
class to determine sort order.compare
in interface Comparable
je1
- The first JobEntry
object.je2
- The second JobEntry
object.int
indicating the result of the comparison.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |