org.apache.sling.event.impl.jobs.queues
Class TopicRoundRobinJobQueue
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.TopicRoundRobinJobQueue
- All Implemented Interfaces:
- JobStatusNotifier, Queue, Statistics
public final class TopicRoundRobinJobQueue
- extends AbstractParallelJobQueue
This queue acts similar to the parallel job queue. Except that
new jobs are selected based on a round robin topic selection scheme.
Failing jobs are rescheduled and put at the end of 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 |
TopicRoundRobinJobQueue
public TopicRoundRobinJobQueue(String name,
InternalQueueConfiguration config,
EnvironmentComponent env,
Scheduler scheduler)
getStateInfo
public String getStateInfo()
- Description copied from interface:
Queue
- Return some information about the current state of the queue. This
method is meant to see the internal state of the queue for debugging
or monitoring purposes.
- Specified by:
getStateInfo
in interface Queue
- Overrides:
getStateInfo
in class AbstractParallelJobQueue
- See Also:
Queue.getStateInfo()
canBeMarkedForRemoval
protected boolean canBeMarkedForRemoval()
- Overrides:
canBeMarkedForRemoval
in class AbstractParallelJobQueue
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.