Package org.frankframework.scheduler.job
Class CleanupDatabaseJob
java.lang.Object
org.frankframework.core.TransactionAttributes
org.frankframework.scheduler.AbstractJobDef
org.frankframework.scheduler.job.CleanupDatabaseJob
- All Implemented Interfaces:
FrankElement
,HasApplicationContext
,HasName
,HasTransactionAttribute
,IConfigurable
,IScopeProvider
,NameAware
,ConfigurableLifecycle
,IJob
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
,org.springframework.context.Lifecycle
,org.springframework.context.Phased
,org.springframework.context.SmartLifecycle
Frank!Framework job to cleanup the
.
IBISSTORE
and IBISLOCK
tables.
Find all MessageLogs and Lockers in the current configuration and removes database
entries which have surpassed their corresponding
invalid reference
MessageLog's ExpiryDateField
-
Field Summary
Fields inherited from class org.frankframework.core.TransactionAttributes
log
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Called before executeJob to prepare resources for executeJob method.void
execute()
Is wrapped around aLocker
andexceptions
will be managed automatically.Locate all Lockers, and find out which datasources are used.protected List
<org.frankframework.scheduler.job.CleanupDatabaseJob.MessageLogObject> getCleanUpIbisstoreQuery
(String tableName, String keyField, String typeField, String expiryDateField, int maxRows, Dbms dbmsName) void
setQueryTimeout
(int i) The number of seconds the database driver will wait for a statement to execute.Methods inherited from class org.frankframework.scheduler.AbstractJobDef
configure, decrementCountThreads, executeJob, getIbisManager, getJobDetail, getMessageKeeper, incrementCountThreads, isRunning, setCronExpression, setDescription, setInterval, setJobGroup, setLocker, setMessageKeeperSize, setName, setNumThreads, start, stop, toString
Methods inherited from class org.frankframework.core.TransactionAttributes
configureTransactionAttributes, isTransacted, isTransacted, setTransacted, setTransactionTimeout
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContext
Methods inherited from interface org.frankframework.lifecycle.ConfigurableLifecycle
getPhase, isAutoStartup
Methods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoader
Methods inherited from interface org.frankframework.core.HasTransactionAttribute
getTransactionAttribute, getTransactionTimeout, getTxDef, setTransactionAttribute
Methods inherited from interface org.frankframework.scheduler.job.IJob
getCronExpression, getInterval, getJobGroup, getLocker, getName, isConfigured
Methods inherited from interface org.springframework.context.SmartLifecycle
stop
-
Constructor Details
-
CleanupDatabaseJob
public CleanupDatabaseJob()
-
-
Method Details
-
beforeExecuteJob
public boolean beforeExecuteJob()Description copied from class:AbstractJobDef
Called before executeJob to prepare resources for executeJob method. Returns false if job does not need to run- Overrides:
beforeExecuteJob
in classAbstractJobDef
-
execute
public void execute()Description copied from class:AbstractJobDef
Is wrapped around aLocker
andexceptions
will be managed automatically.- Specified by:
execute
in classAbstractJobDef
-
getAllLockerDatasourceNames
Locate all Lockers, and find out which datasources are used.- Returns:
- distinct list of all datasourceNames used by lockers
-
getAllMessageLogs
protected List<org.frankframework.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
-