Package org.nuxeo.ecm.core.versioning
Class OrphanVersionCleanupListener
- java.lang.Object
-
- org.nuxeo.ecm.core.versioning.OrphanVersionCleanupListener
-
- All Implemented Interfaces:
PostCommitEventListener
public class OrphanVersionCleanupListener extends Object implements PostCommitEventListener
Asynchronous listener that calls the orphan versions cleanup service. Designed to be called periodically by a scheduler.- Since:
- 9.1
-
-
Field Summary
Fields Modifier and Type Field Description static long
DEFAULT_COMMIT_SIZE
static String
DEFAULT_COMMIT_SIZE_PROP
Configuration property for the maximum number of orphan versions to delete in one transaction.
-
Constructor Summary
Constructors Constructor Description OrphanVersionCleanupListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected long
getCommitSize()
Gets the maximum number of orphan versions to delete in one transaction.void
handleEvent(EventBundle events)
Handles the set of events that were raised during the life of an user operation.
-
-
-
Field Detail
-
DEFAULT_COMMIT_SIZE
public static final long DEFAULT_COMMIT_SIZE
- See Also:
- Constant Field Values
-
DEFAULT_COMMIT_SIZE_PROP
public static final String DEFAULT_COMMIT_SIZE_PROP
Configuration property for the maximum number of orphan versions to delete in one transaction. Default is 1000L.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OrphanVersionCleanupListener
public OrphanVersionCleanupListener()
-
-
Method Detail
-
getCommitSize
protected long getCommitSize()
Gets the maximum number of orphan versions to delete in one transaction.
-
handleEvent
public void handleEvent(EventBundle events)
Description copied from interface:PostCommitEventListener
Handles the set of events that were raised during the life of an user operation.The events are fired as a
BundleEvent
after the transaction is committed.- Specified by:
handleEvent
in interfacePostCommitEventListener
- Parameters:
events
- the events to handle
-
-