|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.sling.event.impl.jobs.StatisticsImpl
org.apache.sling.event.impl.jobs.queues.AbstractJobQueue
org.apache.sling.event.impl.jobs.queues.OrderedJobQueue
public final class OrderedJobQueue
An ordered job queue is processing the queue FIFO in a serialized way. If a job fails it is rescheduled and the reschedule is processed next - this basically means that failing jobs block the queue until they are finished!
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.sling.event.impl.jobs.JobStatusNotifier |
|---|
JobStatusNotifier.NotifierContext |
| Field Summary |
|---|
| Fields inherited from class org.apache.sling.event.impl.jobs.queues.AbstractJobQueue |
|---|
configuration, isWaiting, logger, queueName, running |
| Fields inherited from interface org.apache.sling.event.impl.jobs.JobStatusNotifier |
|---|
CONTEXT_PROPERTY_NAME |
| Constructor Summary | |
|---|---|
OrderedJobQueue(java.lang.String name,
InternalQueueConfiguration config,
EnvironmentComponent env)
|
|
| Method Summary | |
|---|---|
void |
clear()
Remove all outstanding jobs from the queue. |
java.lang.Object |
getState(java.lang.String key)
For monitoring purposes and possible extensions from the different queue types. |
java.lang.String |
getStateInfo()
Return some information about the current state of the queue. |
protected boolean |
isEmpty()
Is the queue empty? |
protected void |
notifyFinished(JobEvent rescheduleInfo)
|
protected void |
put(JobEvent event)
Put another job into the queue. |
void |
removeAll()
Remove all outstanding jobs and delete them. |
protected java.util.Collection<JobEvent> |
removeAllJobs()
Remove all events from the queue and return them. |
protected JobEvent |
reschedule(JobEvent info)
Reschedule a job. |
void |
resume()
Resume a suspended queue. |
protected JobEvent |
start(JobEvent processInfo)
|
protected JobEvent |
take()
Get another job from the queue. |
| Methods inherited from class org.apache.sling.event.impl.jobs.queues.AbstractJobQueue |
|---|
canBeMarkedForRemoval, checkForUnprocessedJobs, close, executeJob, finishedJob, getConfiguration, getName, getStatistics, ignoreException, isMarkedForRemoval, isSuspended, markForRemoval, process, rename, sendAcknowledge, start, suspend |
| Methods inherited from class org.apache.sling.event.impl.jobs.StatisticsImpl |
|---|
add, addActive, cancelledJob, clearQueued, copyFrom, decQueued, failedJob, finishedJob, getAverageProcessingTime, getAverageWaitingTime, getLastActivatedJobTime, getLastFinishedJobTime, getNumberOfActiveJobs, getNumberOfCancelledJobs, getNumberOfFailedJobs, getNumberOfFinishedJobs, getNumberOfJobs, getNumberOfProcessedJobs, getNumberOfQueuedJobs, getStartTime, incQueued, reset |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OrderedJobQueue(java.lang.String name,
InternalQueueConfiguration config,
EnvironmentComponent env)
| Method Detail |
|---|
public java.lang.String getStateInfo()
Queue
getStateInfo in interface QueuegetStateInfo in class AbstractJobQueueQueue.getStateInfo()protected JobEvent start(JobEvent processInfo)
start in class AbstractJobQueuepublic void resume()
QueueQueue.suspend(). If the queue is not
suspended, calling this method has no effect.
Depending on the queue implementation, if a job failed a job queue might
sleep for a configured time, before a new job is processed. By calling this
method, the job queue can be woken up and force an immediate reprocessing.
This feature is only supported by ordered queues at the moment. If a queue
does not support this feature, calling this method has only an effect if
the queue is really supsended.
resume in interface Queueresume in class AbstractJobQueueQueue.resume()protected void put(JobEvent event)
AbstractJobQueue
put in class AbstractJobQueueprotected JobEvent take()
AbstractJobQueue
take in class AbstractJobQueueprotected boolean isEmpty()
AbstractJobQueue
isEmpty in class AbstractJobQueueprotected void notifyFinished(JobEvent rescheduleInfo)
notifyFinished in class AbstractJobQueueprotected JobEvent reschedule(JobEvent info)
AbstractJobQueue
reschedule in class AbstractJobQueuepublic void clear()
Queue
clear in interface Queueclear in class AbstractJobQueueQueue.clear()public void removeAll()
Queue
removeAll in interface QueueremoveAll in class AbstractJobQueueQueue.removeAll()protected java.util.Collection<JobEvent> removeAllJobs()
AbstractJobQueue
removeAllJobs in class AbstractJobQueuepublic java.lang.Object getState(java.lang.String key)
Queue
getState in interface QueuegetState in class AbstractJobQueueQueue.getState(java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||