org.apache.sling.event.impl.jobs.queues
Class AbstractParallelJobQueue

java.lang.Object
  extended by org.apache.sling.event.impl.jobs.stats.StatisticsImpl
      extended by org.apache.sling.event.impl.jobs.queues.AbstractJobQueue
          extended by org.apache.sling.event.impl.jobs.queues.AbstractParallelJobQueue
All Implemented Interfaces:
JobStatusNotifier, Queue, Statistics
Direct Known Subclasses:
ParallelJobQueue, TopicRoundRobinJobQueue

public abstract class AbstractParallelJobQueue
extends AbstractJobQueue

Abstract base class for a parallel processing job queue.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.sling.event.impl.jobs.deprecated.JobStatusNotifier
JobStatusNotifier.NotifierContext
 
Field Summary
protected  int jobCount
           
 
Fields inherited from class org.apache.sling.event.impl.jobs.queues.AbstractJobQueue
configuration, isWaiting, isWaitingForNext, logger, queueName, running
 
Fields inherited from interface org.apache.sling.event.impl.jobs.deprecated.JobStatusNotifier
CONTEXT_PROPERTY_NAME
 
Constructor Summary
AbstractParallelJobQueue(String name, InternalQueueConfiguration config, JobConsumerManager jobConsumerManager, org.osgi.service.event.EventAdmin eventAdmin, org.apache.sling.commons.scheduler.Scheduler scheduler)
           
 
Method Summary
protected  boolean canBeClosed()
          Check whether this queue can be closed
 String getStateInfo()
          Return some information about the current state of the queue.
protected  void notifyFinished(JobHandler rescheduleInfo)
           
protected  JobHandler reschedule(JobHandler info)
          Reschedule a job.
protected  JobHandler start(JobHandler processInfo)
           
 
Methods inherited from class org.apache.sling.event.impl.jobs.queues.AbstractJobQueue
checkForUnprocessedJobs, clear, close, executeJob, finishedJob, getConfiguration, getName, getState, getStatistics, ignoreException, isEmpty, isOutdated, isSuspended, outdate, process, put, removeAll, removeAllJobs, resume, sendAcknowledge, start, suspend, take, tryToClose
 
Methods inherited from class org.apache.sling.event.impl.jobs.stats.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
 

Field Detail

jobCount

protected volatile int jobCount
Constructor Detail

AbstractParallelJobQueue

public AbstractParallelJobQueue(String name,
                                InternalQueueConfiguration config,
                                JobConsumerManager jobConsumerManager,
                                org.osgi.service.event.EventAdmin eventAdmin,
                                org.apache.sling.commons.scheduler.Scheduler scheduler)
Method Detail

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 AbstractJobQueue
See Also:
Queue.getStateInfo()

start

protected JobHandler start(JobHandler processInfo)
Specified by:
start in class AbstractJobQueue

canBeClosed

protected boolean canBeClosed()
Description copied from class: AbstractJobQueue
Check whether this queue can be closed

Overrides:
canBeClosed in class AbstractJobQueue

notifyFinished

protected void notifyFinished(JobHandler rescheduleInfo)
Specified by:
notifyFinished in class AbstractJobQueue

reschedule

protected JobHandler reschedule(JobHandler info)
Description copied from class: AbstractJobQueue
Reschedule a job.

Specified by:
reschedule in class AbstractJobQueue


Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.