|
||||||||||
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(String name,
InternalQueueConfiguration config,
EnvironmentComponent env)
|
Method Summary | |
---|---|
void |
clear()
Remove all outstanding jobs from the queue. |
Object |
getState(String key)
For monitoring purposes and possible extensions from the different queue types. |
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 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(String name, InternalQueueConfiguration config, EnvironmentComponent env)
Method Detail |
---|
public String getStateInfo()
Queue
getStateInfo
in interface Queue
getStateInfo
in class AbstractJobQueue
Queue.getStateInfo()
protected JobEvent start(JobEvent processInfo)
start
in class AbstractJobQueue
public void resume()
Queue
Queue.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 Queue
resume
in class AbstractJobQueue
Queue.resume()
protected void put(JobEvent event)
AbstractJobQueue
put
in class AbstractJobQueue
protected JobEvent take()
AbstractJobQueue
take
in class AbstractJobQueue
protected boolean isEmpty()
AbstractJobQueue
isEmpty
in class AbstractJobQueue
protected void notifyFinished(JobEvent rescheduleInfo)
notifyFinished
in class AbstractJobQueue
protected JobEvent reschedule(JobEvent info)
AbstractJobQueue
reschedule
in class AbstractJobQueue
public void clear()
Queue
clear
in interface Queue
clear
in class AbstractJobQueue
Queue.clear()
public void removeAll()
Queue
removeAll
in interface Queue
removeAll
in class AbstractJobQueue
Queue.removeAll()
protected Collection<JobEvent> removeAllJobs()
AbstractJobQueue
removeAllJobs
in class AbstractJobQueue
public Object getState(String key)
Queue
getState
in interface Queue
getState
in class AbstractJobQueue
Queue.getState(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |