|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.content.cleanup.ContentStoreCleaner
public class ContentStoreCleaner
This component is responsible cleaning up orphaned content. Clean-up happens at two levels.
Eager cleanup: (since 3.2) Ifeager cleanup
is activated, then this
component listens to all content property change events and recorded for post-transaction
processing. All orphaned content is deleted from the registered store(s). Note that
any listeners
are called as normal; backup or scrubbing
procedures should be plugged in as listeners if this is required.
Lazy cleanup:
This is triggered by means of a Quartz job
. This process
gets content URLs that have been marked as orphaned and cleans up the various stores.
Once again, the listeners are called appropriately.
How backup policies are affected:
When restoring the system from a backup, the type of restore required is dictated by
the cleanup policy being enforced. If eager cleanup is active, the system mustDeletedContentBackupCleanerListener
, or
Nested Class Summary | |
---|---|
static class |
ContentStoreCleaner.DeleteFailureAction
Enumeration of actions to take in the even that an orphaned binary fails to get deleted. |
Constructor Summary | |
---|---|
ContentStoreCleaner()
|
Method Summary | |
---|---|
void |
execute()
|
void |
init()
Initializes the cleaner based on the eagerCleanup flag. |
void |
setAvmNodeDAO(AVMNodeDAO avmNodeDAO)
|
void |
setContentDataDAO(ContentDataDAO contentDataDAO)
|
void |
setContentService(ContentService contentService)
|
void |
setDeletionFailureAction(ContentStoreCleaner.DeleteFailureAction deletionFailureAction)
Set the action to take in the event that an orphaned binary failed to get deleted. |
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
|
void |
setEagerContentStoreCleaner(EagerContentStoreCleaner eagerContentStoreCleaner)
Set the component that will do the physical deleting |
void |
setJobLockService(JobLockService jobLockService)
|
void |
setProtectDays(int protectDays)
Set the minimum number of days old that orphaned content must be before deletion is possible. |
void |
setTransactionService(TransactionService transactionService)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContentStoreCleaner()
Method Detail |
---|
public void setEagerContentStoreCleaner(EagerContentStoreCleaner eagerContentStoreCleaner)
public void setJobLockService(JobLockService jobLockService)
jobLockService
- service used to ensure that cleanup runs are not duplicatedpublic void setContentDataDAO(ContentDataDAO contentDataDAO)
contentDataDAO
- DAO used for enumerating DM content URLspublic void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
dictionaryService
- used to determine which properties are content propertiespublic void setContentService(ContentService contentService)
contentService
- service to copy content binariespublic void setAvmNodeDAO(AVMNodeDAO avmNodeDAO)
avmNodeDAO
- The AVM Node DAO to get urls with.public void setTransactionService(TransactionService transactionService)
transactionService
- the component to ensure proper transactional wrappingpublic void setProtectDays(int protectDays)
protectDays
- minimum age (in days) of deleted contentpublic void setDeletionFailureAction(ContentStoreCleaner.DeleteFailureAction deletionFailureAction)
ContentStoreCleaner.DeleteFailureAction.IGNORE
.
deletionFailureAction
- the action to take when deletes failpublic void init()
eagerCleanup
flag.
public void execute()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |