Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.turbine.services.schedule
Class JobQueue

    java.lang.Object
      org.apache.turbine.services.schedule.JobQueue

    public class JobQueue

extends Object

Queue for the scheduler.

Version:
  $Id: JobQueue.java 615328 2008-01-25 20:25:05Z tv $
Author:
  Dave Bryson, Quinton McCombs

Constructor Summary
`JobQueue()` Creates a new instance.

Method Summary
`void` | `add(JobEntry je)` Add a job to the queue.
`void` | `batchLoad(List<JobEntry> jobEntries)` Batch load jobs.
`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.
`Vector<JobEntry>` | `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.
`void` | `updateQueue(JobEntry je)` Update the job for its next run time.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JobQueue

    public JobQueue()

  Creates a new instance.

Method Detail

### getNext

    public JobEntry getNext()

  Return the next job off the top of the queue, or `null` if there are no jobs in the queue.

  Returns:
    The next job in the queue.

### getJob

    public JobEntry getJob(JobEntry je)

  Return a specific job.

  Parameters:
    `je` - The JobEntry we are looking for.
  Returns:
    A JobEntry.

### list

    public Vector<JobEntry> list()

  List jobs in the queue. This is used by the scheduler UI.

  Returns:
    A Vector of `JobEntry` objects.

### add

    public void add(JobEntry je)

  Add a job to the queue.

  Parameters:
    `je` - A JobEntry job.

### batchLoad

    public void batchLoad(List<JobEntry> jobEntries)

  Batch load jobs. Retains any already enqueued jobs. Called on `SchedulerService` start-up.

  Parameters:
    `jobEntries` - A list of the `JobEntry` objects to load.

### remove

    public void remove(JobEntry je)

  Remove a job from the queue.

  Parameters:
    `je` - A JobEntry with the job to remove.

### modify

    public void modify(JobEntry je)
                throws TurbineException

  Modify a job on the queue.

  Parameters:
    `je` - A JobEntry with the job to modify
  Throws:
    `TurbineException`

### updateQueue

    public void updateQueue(JobEntry je)
                     throws TurbineException

  Update the job for its next run time.

  Parameters:
    `je` - A JobEntry to be updated.
  Throws:
    `TurbineException` - a generic exception.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2011 The Apache Software Foundation. All Rights Reserved.