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

java.lang.Object
  extended by org.apache.sling.event.impl.jobs.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.JobStatusNotifier
JobStatusNotifier.NotifierContext
 
Field Summary
protected  int jobCount
           
 
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
AbstractParallelJobQueue(String name, InternalQueueConfiguration config, EnvironmentComponent env, Scheduler scheduler)
           
 
Method Summary
protected  boolean canBeMarkedForRemoval()
           
 String getStateInfo()
          Return some information about the current state of the queue.
protected  void notifyFinished(JobEvent rescheduleInfo)
           
protected  JobEvent reschedule(JobEvent info)
          Reschedule a job.
protected  JobEvent start(JobEvent processInfo)
           
 
Methods inherited from class org.apache.sling.event.impl.jobs.queues.AbstractJobQueue
checkForUnprocessedJobs, clear, close, executeJob, finishedJob, getConfiguration, getName, getState, getStatistics, ignoreException, isEmpty, isMarkedForRemoval, isSuspended, markForRemoval, process, put, removeAll, removeAllJobs, rename, resume, sendAcknowledge, start, suspend, take
 
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
 

Field Detail

jobCount

protected volatile int jobCount
Constructor Detail

AbstractParallelJobQueue

public AbstractParallelJobQueue(String name,
                                InternalQueueConfiguration config,
                                EnvironmentComponent env,
                                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 JobEvent start(JobEvent processInfo)
Specified by:
start in class AbstractJobQueue

canBeMarkedForRemoval

protected boolean canBeMarkedForRemoval()
Overrides:
canBeMarkedForRemoval in class AbstractJobQueue

notifyFinished

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

reschedule

protected JobEvent reschedule(JobEvent 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.