Class CmsPublishQueue

java.lang.Object
org.opencms.publish.CmsPublishQueue

public class CmsPublishQueue extends Object
This queue contains all not jet started publish jobs.

Since:
6.5.5
  • Field Details

  • Constructor Details

    • CmsPublishQueue

      protected CmsPublishQueue(CmsPublishEngine publishEngine)
      Default constructor, for an empty queue.

      Parameters:
      publishEngine - the publish engine instance
  • Method Details

    • getQueue

      public static org.apache.commons.collections.Buffer getQueue()
      Creates the buffer used as publish queue.

      Returns:
      the queue buffer
    • abortPublishJob

      protected boolean abortPublishJob(CmsPublishJobInfoBean publishJob)
      Aborts the given publish job.

      Parameters:
      publishJob - the publish job to abort
      Returns:
      true if the publish job was found
    • add

      protected void add(CmsPublishJobInfoBean publishJob) throws CmsException
      Pushes a new publish job with the given information in publish queue.

      If possible, the publish job starts immediately.

      Parameters:
      publishJob - the publish job to enqueue
      Throws:
      CmsException - if something goes wrong
    • asList

      Returns an unmodifiable list representation of this queue.

      Returns:
      a list of CmsPublishJobEnqueued objects
    • contains

      protected boolean contains(CmsPublishJobInfoBean publishJob)
      Checks if the given job is already in the queue, this does only check for the identical job.

      Parameters:
      publishJob - the publish job to check for
      Returns:
      true if the given job is already in the queue
    • initialize

      protected void initialize(CmsObject adminCms, boolean revive)
      Initializes the internal FIFO queue with publish jobs from the database.

      Parameters:
      adminCms - an admin cms object
      revive - true if the publish queue should be revived from the database
    • isEmpty

      protected boolean isEmpty()
      Checks if the queue is empty.

      Returns:
      true if the queue is empty
    • next

      Returns the next publish job to be published, removing it from the queue, or null if the queue is empty.

      Returns:
      the next publish job to be published
    • remove

      protected void remove(CmsPublishJobInfoBean publishJob) throws CmsException
      Removes the given job from the list.

      Parameters:
      publishJob - the publish job to remove
      Throws:
      CmsException - if something goes wrong
    • update

      protected void update(CmsPublishJobInfoBean publishJob)
      Updates the given job in the list.

      Parameters:
      publishJob - the publish job to