Package org.opencms.publish
Class CmsPublishQueue
java.lang.Object
org.opencms.publish.CmsPublishQueue
This queue contains all not jet started publish jobs.
- Since:
- 6.5.5
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCmsPublishQueue(CmsPublishEngine publishEngine) Default constructor, for an empty queue. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanabortPublishJob(CmsPublishJobInfoBean publishJob) Aborts the given publish job.protected voidadd(CmsPublishJobInfoBean publishJob) Pushes a new publish job with the given information in publish queue.protected List<CmsPublishJobEnqueued> asList()Returns an unmodifiable list representation of this queue.protected booleancontains(CmsPublishJobInfoBean publishJob) Checks if the given job is already in the queue, this does only check for the identical job.static org.apache.commons.collections.BuffergetQueue()Creates the buffer used as publish queue.protected voidinitialize(CmsObject adminCms, boolean revive) Initializes the internal FIFO queue with publish jobs from the database.protected booleanisEmpty()Checks if the queue is empty.protected CmsPublishJobInfoBeannext()Returns the next publish job to be published, removing it from the queue, ornullif the queue is empty.protected voidremove(CmsPublishJobInfoBean publishJob) Removes the given job from the list.protected voidupdate(CmsPublishJobInfoBean publishJob) Updates the given job in the list.
-
Field Details
-
m_publishEngine
The publish engine.
-
-
Constructor Details
-
CmsPublishQueue
Default constructor, for an empty queue.- Parameters:
publishEngine- the publish engine instance
-
-
Method Details
-
getQueue
Creates the buffer used as publish queue.- Returns:
- the queue buffer
-
abortPublishJob
Aborts the given publish job.- Parameters:
publishJob- the publish job to abort- Returns:
trueif the publish job was found
-
add
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
CmsPublishJobEnqueuedobjects
-
contains
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
Initializes the internal FIFO queue with publish jobs from the database.- Parameters:
adminCms- an admin cms objectrevive-trueif the publish queue should be revived from the database
-
isEmpty
Checks if the queue is empty.- Returns:
trueif the queue is empty
-
next
Returns the next publish job to be published, removing it from the queue, ornullif the queue is empty.- Returns:
- the next publish job to be published
-
remove
Removes the given job from the list.- Parameters:
publishJob- the publish job to remove- Throws:
CmsException- if something goes wrong
-
update
Updates the given job in the list.- Parameters:
publishJob- the publish job to
-