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
public class DeletedNodeCleanupWorker extends AbstractNodeCleanupWorker
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 Constructor Description DeletedNodeCleanupWorker()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<java.lang.String>doCleanInternal()Do the actual cleanup.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
-
-
-
-
Method Detail
-
doCleanInternal
protected java.util.List<java.lang.String> doCleanInternal() throws java.lang.ThrowableDo the actual cleanup. Any errors are handled by this base class.- Specified by:
doCleanInternalin classAbstractNodeCleanupWorker- Returns:
- Returns the cleanup messages.
- Throws:
java.lang.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
-
-