| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.endeca.index.admin.InMemoryJobQueue
public class InMemoryJobQueue
A simple component which implements JobQueue interface.
It stores IndexingJob object in memory only. So after server restarts, the job queue will be empty. The component tries to start indexing jobs when a running indexing job finishes. It also allows restarting of indexing jobs from the queue periodically (by specifying the schedule property).
Created: January 20 2012
JobQueue, 
SimpleIndexingAdmin| Field Summary | |
|---|---|
| static java.lang.String | CLASS_VERSIONClass version string | 
| protected  ScheduledJob | mScheduledJob | 
| Fields inherited from class atg.nucleus.GenericService | 
|---|
| SERVICE_INFO_KEY | 
| Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging | 
|---|
| DEFAULT_LOG_TRACE_STATUS | 
| Fields inherited from interface atg.nucleus.logging.ApplicationLogging | 
|---|
| DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS | 
| Constructor Summary | |
|---|---|
| InMemoryJobQueue() | |
| Method Summary | |
|---|---|
| protected  javax.servlet.Servlet | createAdminServlet()Creates and returns a new Servlet that will administer this service. | 
|  void | doStartService()This is called after a Service has been created, placed into the naming hierarchy, and initialized with its configured property values. | 
|  void | doStopService()This is called when a Service is required to shut down. | 
|  void | enqueueJob(IndexingJob pJob,
           boolean pPriorityJob)Add an indexing job to the queue. | 
|  java.lang.String | getJobId(IndexingJob pJob)Generated internal ID for a job. | 
|  IndexingJob[] | getQueuedJobs()Returns an array of queued indexing jobs. | 
|  Schedule | getSchedule()Returns property schedule. | 
|  ScheduledJob | getScheduledJob()Returns property scheduledJob. | 
|  Scheduler | getScheduler()Returns property scheduler. | 
|  void | performScheduledTask(Scheduler pScheduler,
                     ScheduledJob pJob)Restarts all queued index jobs. | 
|  void | processJobQueue()Tries to restart all queued jobs in separate thread (to avoid any blocking issues). | 
|  void | removeJob(IndexingJob pJob)Removes indexing job from the queue. | 
|  void | setSchedule(Schedule pSchedule)Sets property schedule. | 
|  void | setScheduler(Scheduler pScheduler)Sets property scheduler. | 
| protected  void | stopScheduledJob()Stop the specified scheduled job and log any exception. | 
| Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl | 
|---|
| vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static java.lang.String CLASS_VERSION
protected ScheduledJob mScheduledJob
| Constructor Detail | 
|---|
public InMemoryJobQueue()
| Method Detail | 
|---|
public void setScheduler(Scheduler pScheduler)
public Scheduler getScheduler()
public void setSchedule(Schedule pSchedule)
public Schedule getSchedule()
public ScheduledJob getScheduledJob()
public void enqueueJob(IndexingJob pJob,
                       boolean pPriorityJob)
                throws atg.repository.search.indexing.IndexingException
enqueueJob in interface JobQueuepJob - an indexing job to addpPriorityJob - true if the job should be dequeued first
atg.repository.search.indexing.IndexingExceptionpublic IndexingJob[] getQueuedJobs()
getQueuedJobs in interface JobQueuepublic java.lang.String getJobId(IndexingJob pJob)
pJob - an indexing job
public void removeJob(IndexingJob pJob)
removeJob in interface JobQueuepJob - a job to be removedpublic void processJobQueue()
processJobQueue in interface JobQueue
public void performScheduledTask(Scheduler pScheduler,
                                 ScheduledJob pJob)
performScheduledTask in interface SchedulablepScheduler - calling the jobpJob - the ScheduledJobprotected void stopScheduledJob()
public void doStartService()
                    throws ServiceException
GenericService
doStartService in class GenericServiceServiceException - if the Service had a problem starting up
public void doStopService()
                   throws ServiceException
GenericService
doStopService in class GenericServiceServiceException - if the Service had a problem shutting downprotected javax.servlet.Servlet createAdminServlet()
GenericService
createAdminServlet in class GenericService| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||