Class CleanupDatabaseJob
- java.lang.Object
-
- nl.nn.adapterframework.core.TransactionAttributes
-
- nl.nn.adapterframework.scheduler.JobDef
-
- nl.nn.adapterframework.scheduler.job.CleanupDatabaseJob
-
- All Implemented Interfaces:
HasTransactionAttribute
,IConfigurable
,IConfigurationAware
,INamedObject
,IScopeProvider
,IJob
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class CleanupDatabaseJob extends JobDef
-
-
Field Summary
-
Fields inherited from class nl.nn.adapterframework.core.TransactionAttributes
log
-
-
Constructor Summary
Constructors Constructor Description CleanupDatabaseJob()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
beforeExecuteJob()
Called before executeJob to prepare resources for executeJob method.void
execute()
Actual implementation of theIJob
.protected Set<String>
getAllLockerDatasourceNames()
Locate all Lockers, and find out which datasources are used.protected List<nl.nn.adapterframework.scheduler.job.CleanupDatabaseJob.MessageLogObject>
getAllMessageLogs()
String
getCleanUpIbisstoreQuery(String tableName, String keyField, String typeField, String expiryDateField, int maxRows, Dbms dbmsName)
int
getQueryTimeout()
void
setQueryTimeout(int i)
The number of seconds the database driver will wait for a statement to execute.-
Methods inherited from class nl.nn.adapterframework.scheduler.JobDef
configure, decrementCountThreads, executeJob, getApplicationContext, getConfigurationClassLoader, getCronExpression, getDescription, getIbisManager, getInterval, getJobDetail, getJobGroup, getLocker, getLogPrefix, getMessageKeeper, getName, getNumThreads, getStatisticsKeeper, incrementCountThreads, isConfigured, setApplicationContext, setCronExpression, setDescription, setInterval, setJobGroup, setLocker, setMessageKeeperSize, setName, setNumThreads, toString
-
Methods inherited from class nl.nn.adapterframework.core.TransactionAttributes
configureTransactionAttributes, getTransactionAttribute, getTransactionTimeout, getTxDef, isTransacted, isTransacted, setTransacted, setTransactionAttribute, setTransactionTimeout
-
-
-
-
Method Detail
-
beforeExecuteJob
public boolean beforeExecuteJob()
Description copied from class:JobDef
Called before executeJob to prepare resources for executeJob method. Returns false if job does not need to run- Overrides:
beforeExecuteJob
in classJobDef
-
execute
public void execute()
Description copied from interface:IJob
Actual implementation of theIJob
. Is wrapped around aLocker
,exceptions
andstatistics
will be managed automatically.
-
getAllLockerDatasourceNames
protected Set<String> getAllLockerDatasourceNames()
Locate all Lockers, and find out which datasources are used.- Returns:
- distinct list of all datasourceNames used by lockers
-
getAllMessageLogs
protected List<nl.nn.adapterframework.scheduler.job.CleanupDatabaseJob.MessageLogObject> getAllMessageLogs()
-
setQueryTimeout
public void setQueryTimeout(int i)
The number of seconds the database driver will wait for a statement to execute. If the limit is exceeded, a TimeoutException is thrown. 0 means no timeout- Default value
- 0
-
getCleanUpIbisstoreQuery
public String getCleanUpIbisstoreQuery(String tableName, String keyField, String typeField, String expiryDateField, int maxRows, Dbms dbmsName)
-
getQueryTimeout
public int getQueryTimeout()
-
-