atg.repository.search.indexing
Class IndexingPeriodicService

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.service.scheduler.SchedulableService
              extended by atg.repository.search.indexing.IndexingPeriodicService
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, Schedulable, java.util.EventListener

public class IndexingPeriodicService
extends SchedulableService

The indexing periodic service. This service checks for claimed but expired configurations, and for configurations that have incremental updates due.

Created: April 21 2005

See Also:
AnotherClass

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from class atg.service.scheduler.SchedulableService
mJobId
 
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
IndexingPeriodicService()
           
 
Method Summary
 void checkForExpiredConfigurationClaims()
          Look for expirations that have expired.
 void doStartService()
          The default implementation is to just start our scheduled job.
 ConfigStatePersister getConfigStatePersister()
          Get the configuration state persister.
 IncrementalLoader getIncrementalLoader()
          Get the incremental loader to use.
 java.util.List getIncrementalLoaders()
           
 boolean isEnabled()
          Return whether this service is enabled.
protected  boolean needsIncrementalUpdate(ConfigStatePersister.ConfigState pConfigState, IndexingOutputConfig pConfig)
          Whether the specified configuration needs an incremental update based on the last update indexed times.
 void performScheduledTask()
          Perform our scheduled task.
 void performScheduledTask(Scheduler pScheduler, ScheduledJob pJob)
          Called by the scheduler when it is time for this service to perform its function.
 void scanForIncrementalUpdates()
          Look for configurations to claim.
protected  void scanForIncrementalUpdates(IncrementalLoader pLoader)
           
 void setConfigStatePersister(ConfigStatePersister pConfigStatePersister)
          Set the configuration state persister.
 void setEnabled(boolean pEnabled)
          Set whether this service is enabled.
 void setIncrementalLoader(IncrementalLoader pIncrementalLoader)
          Set the incremental loader to use.
 void setIncrementalLoaders(java.util.List pLoaders)
           
 
Methods inherited from class atg.service.scheduler.SchedulableService
doStopService, getJobDescription, getJobName, getSchedule, getScheduler, getThreadMethod, isTransactional, setJobDescription, setJobName, setSchedule, setScheduler, setThreadMethod, setTransactional, startScheduledJob, stopScheduledJob
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, 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

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Constructor Detail

IndexingPeriodicService

public IndexingPeriodicService()
Method Detail

setConfigStatePersister

public void setConfigStatePersister(ConfigStatePersister pConfigStatePersister)
Set the configuration state persister.


getConfigStatePersister

public ConfigStatePersister getConfigStatePersister()
Get the configuration state persister.


setEnabled

public void setEnabled(boolean pEnabled)
Set whether this service is enabled.


isEnabled

public boolean isEnabled()
Return whether this service is enabled.


setIncrementalLoader

public void setIncrementalLoader(IncrementalLoader pIncrementalLoader)
Set the incremental loader to use.


getIncrementalLoader

public IncrementalLoader getIncrementalLoader()
Get the incremental loader to use.


getIncrementalLoaders

public java.util.List getIncrementalLoaders()

setIncrementalLoaders

public void setIncrementalLoaders(java.util.List pLoaders)

doStartService

public void doStartService()
                    throws ServiceException
The default implementation is to just start our scheduled job. Subclasses should override this to perform any extra initialization they may require.

Overrides:
doStartService in class SchedulableService
Throws:
ServiceException - if an error occurred during the operation

performScheduledTask

public void performScheduledTask(Scheduler pScheduler,
                                 ScheduledJob pJob)
Called by the scheduler when it is time for this service to perform its function.

Specified by:
performScheduledTask in interface Schedulable
Specified by:
performScheduledTask in class SchedulableService
Parameters:
pScheduler - the scheduler managing this job
pJob - the scheduled job associated with this service

performScheduledTask

public void performScheduledTask()
                          throws IndexingException
Perform our scheduled task.

Throws:
IndexingException

checkForExpiredConfigurationClaims

public void checkForExpiredConfigurationClaims()
                                        throws IndexingException
Look for expirations that have expired.

Throws:
IndexingException

scanForIncrementalUpdates

public void scanForIncrementalUpdates()
Look for configurations to claim.


scanForIncrementalUpdates

protected void scanForIncrementalUpdates(IncrementalLoader pLoader)

needsIncrementalUpdate

protected boolean needsIncrementalUpdate(ConfigStatePersister.ConfigState pConfigState,
                                         IndexingOutputConfig pConfig)
Whether the specified configuration needs an incremental update based on the last update indexed times.

Parameters:
pConfigState - the configuration state to check
pConfig - the configuration.