atg.purge
Class PurgeExecutor

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.purge.PurgeExecutor
All Implemented Interfaces:
atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener

public class PurgeExecutor
extends GenericService

Purge executor is processing purge items by batches each of them in a separate transaction and doing multi-threading processing for each batch. Throttler is in use to control amount of work we are executing.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
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
PurgeExecutor()
           
 
Method Summary
 void doStartService()
          Ensure that all required properties are set
 boolean execute(PurgeItem[] pPurgeItems)
          Processing purge items by batches each of them in a separate transaction and doing multi-threading processing for each batch.
 java.lang.Integer getBatchSize()
          Returns batch size
 atg.purge.throttle.ThrottleAlgorithmFactory getFactory()
          Returns throttle algorithm factory
 ProcessConfiguration getProcessConfiguration()
          Returns process configuration
 atg.purge.handler.PurgeHandler getPurgeHandler()
          Returns purge handler to process current purge items
 java.lang.Integer getThreadPoolSize()
          Returns thread pool size
 javax.transaction.TransactionManager getTransactionManager()
          Returns transaction manager
 void setBatchSize(java.lang.Integer pBatchSize)
          Sets property batchSize
 void setFactory(atg.purge.throttle.ThrottleAlgorithmFactory pFactory)
          Sets property factory
 void setProcessConfiguration(ProcessConfiguration pProcessConfiguration)
          Sets property configuration
 void setPurgeHandler(atg.purge.handler.PurgeHandler pPurgeHandler)
          Sets property purgeHandler
 void setThreadPoolSize(java.lang.Integer pThreadPoolSize)
          Sets property threadPoolSize
 void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
          Sets property transactionManager
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
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

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

PurgeExecutor

public PurgeExecutor()
Method Detail

getThreadPoolSize

public java.lang.Integer getThreadPoolSize()
Returns thread pool size

Returns:
the thread pool size

setThreadPoolSize

public void setThreadPoolSize(java.lang.Integer pThreadPoolSize)
Sets property threadPoolSize

Parameters:
pThreadPoolSize - the thread pool size

getBatchSize

public java.lang.Integer getBatchSize()
Returns batch size

Returns:
the batch size

setBatchSize

public void setBatchSize(java.lang.Integer pBatchSize)
Sets property batchSize

Parameters:
pBatchSize - the batch size

getProcessConfiguration

public ProcessConfiguration getProcessConfiguration()
Returns process configuration

Returns:
the process configuration

setProcessConfiguration

public void setProcessConfiguration(ProcessConfiguration pProcessConfiguration)
Sets property configuration

Parameters:
pProcessConfiguration - the process configuration

getPurgeHandler

public atg.purge.handler.PurgeHandler getPurgeHandler()
Returns purge handler to process current purge items

Returns:
the purge handler

setPurgeHandler

public void setPurgeHandler(atg.purge.handler.PurgeHandler pPurgeHandler)
Sets property purgeHandler

Parameters:
pPurgeHandler - the purge handler to process current purge items

getTransactionManager

public javax.transaction.TransactionManager getTransactionManager()
Returns transaction manager

Returns:
the transaction manager

setTransactionManager

public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
Sets property transactionManager

Parameters:
pTransactionManager - the transaction manager

getFactory

public atg.purge.throttle.ThrottleAlgorithmFactory getFactory()
Returns throttle algorithm factory

Returns:
the throttle algorithm factory

setFactory

public void setFactory(atg.purge.throttle.ThrottleAlgorithmFactory pFactory)
Sets property factory

Parameters:
pFactory - the throttle algorithm factory

doStartService

public void doStartService()
                    throws ServiceException
Ensure that all required properties are set

Overrides:
doStartService in class GenericService
Throws:
ServiceException - if the Service had a problem starting up

execute

public boolean execute(PurgeItem[] pPurgeItems)
Processing purge items by batches each of them in a separate transaction and doing multi-threading processing for each batch. Throttler is in use to control amount of work we are executing.

Parameters:
pPurgeItems - the array of purge items
Returns:
the boolean value indicating whether there were some errors during purge execution