Package org.alfresco.repo.node.db
Class DeletedNodeCleanupWorker
java.lang.Object
org.alfresco.repo.node.cleanup.AbstractNodeCleanupWorker
org.alfresco.repo.node.db.DeletedNodeCleanupWorker
- All Implemented Interfaces:
NodeCleanupWorker
Cleans up deleted nodes and dangling transactions that are old enough.
- Since:
- 2.2 SP2
- Author:
- Derek Hulley
-
Field Summary
Fields inherited from class org.alfresco.repo.node.cleanup.AbstractNodeCleanupWorker
dbNodeService, jobLockService, logger, nodeDAO, transactionService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDo the actual cleanup.voidsetAlgorithm(String algorithm) voidsetDeleteBatchSize(int deleteBatchSize) voidsetFromCustomCommitTime(long fromCustomCommitTime) Set a custom "from commit time" that will consider only the transactions after this specified time Setting a negative value or 0 will trigger the default behaviour to get the oldest "from time" for any deleted nodevoidsetMinPurgeAgeDays(int minPurgeAgeDays) Set the minimum age (days) that nodes and transactions must be before they get purged.voidsetPurgeSize(int purgeSize) Set the purge transaction block size.Methods inherited from class org.alfresco.repo.node.cleanup.AbstractNodeCleanupWorker
doClean, refreshLock, register, setDbNodeService, setJobLockService, setNodeDAO, setRegistry, setTransactionService
-
Constructor Details
-
DeletedNodeCleanupWorker
public DeletedNodeCleanupWorker()Default constructor
-
-
Method Details
-
doCleanInternal
Do the actual cleanup. Any errors are handled by this base class.- Specified by:
doCleanInternalin classAbstractNodeCleanupWorker- Returns:
- Returns the cleanup messages.
- Throws:
Throwable
-
setMinPurgeAgeDays
public void setMinPurgeAgeDays(int minPurgeAgeDays) Set the minimum age (days) that nodes and transactions must be before they get purged. The default is 7 days.- Parameters:
minPurgeAgeDays- the minimum age (in days) before nodes and transactions get purged
-
setFromCustomCommitTime
public void setFromCustomCommitTime(long fromCustomCommitTime) Set a custom "from commit time" that will consider only the transactions after this specified time Setting a negative value or 0 will trigger the default behaviour to get the oldest "from time" for any deleted node- Parameters:
fromCustomCommitTime- the custom from commit time value
-
setPurgeSize
public void setPurgeSize(int purgeSize) Set the purge transaction block size. This determines how many unused transactions are purged in one go.- Parameters:
purgeSize- int
-
setAlgorithm
-
setDeleteBatchSize
public void setDeleteBatchSize(int deleteBatchSize)
-