org.apache.sling.event.impl.jobs.queues
Class ParallelJobQueue
java.lang.Object
org.apache.sling.event.impl.jobs.StatisticsImpl
org.apache.sling.event.impl.jobs.queues.AbstractJobQueue
org.apache.sling.event.impl.jobs.queues.AbstractParallelJobQueue
org.apache.sling.event.impl.jobs.queues.ParallelJobQueue
- All Implemented Interfaces:
- JobStatusNotifier, Queue, Statistics
public final class ParallelJobQueue
- extends AbstractParallelJobQueue
The default parallel job queue processing the entries FIFO.
Failing jobs are rescheduled and put at the end of the queue.
Method Summary |
void |
clear()
Remove all outstanding jobs from the queue. |
protected boolean |
isEmpty()
Is the queue empty? |
protected void |
put(JobEvent event)
Put another job into the queue. |
protected Collection<JobEvent> |
removeAllJobs()
Remove all events from the queue and return them. |
protected JobEvent |
take()
Get another job from the queue. |
Methods inherited from class org.apache.sling.event.impl.jobs.queues.AbstractJobQueue |
checkForUnprocessedJobs, close, executeJob, finishedJob, getConfiguration, getName, getState, getStatistics, ignoreException, isMarkedForRemoval, isSuspended, markForRemoval, process, removeAll, rename, resume, 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 |
ParallelJobQueue
public ParallelJobQueue(String name,
InternalQueueConfiguration config,
EnvironmentComponent env,
Scheduler scheduler)
put
protected void put(JobEvent event)
- Description copied from class:
AbstractJobQueue
- Put another job into the queue.
- Specified by:
put
in class AbstractJobQueue
take
protected JobEvent take()
- Description copied from class:
AbstractJobQueue
- Get another job from the queue.
- Specified by:
take
in class AbstractJobQueue
isEmpty
protected boolean isEmpty()
- Description copied from class:
AbstractJobQueue
- Is the queue empty?
- Specified by:
isEmpty
in class AbstractJobQueue
clear
public void clear()
- Description copied from interface:
Queue
- Remove all outstanding jobs from the queue. This does not delete
the jobs. The jobs are either processed by a different cluster node
or on restart.
- Specified by:
clear
in interface Queue
- Overrides:
clear
in class AbstractJobQueue
- See Also:
Queue.clear()
removeAllJobs
protected Collection<JobEvent> removeAllJobs()
- Description copied from class:
AbstractJobQueue
- Remove all events from the queue and return them.
- Specified by:
removeAllJobs
in class AbstractJobQueue
Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.