Class CmsPublishQueue


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

    Since:
    6.5.5
    • Constructor Detail

      • CmsPublishQueue

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

        Parameters:
        publishEngine - the publish engine instance
    • Method Detail

      • 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
      • 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

        protected CmsPublishJobInfoBean 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
      • update

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

        Parameters:
        publishJob - the publish job to