Package org.nuxeo.ecm.core.storage.sql
Class SoftDeleteCleanupListener
java.lang.Object
org.nuxeo.ecm.core.storage.sql.SoftDeleteCleanupListener
- All Implemented Interfaces:
EventListener
Sync listener that calls the soft delete cleanup method of the repositories. Designed to be called periodically.
- Since:
- 5.7
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final String
Property for the minimum delay (in seconds) since when a document must have been soft-deleted before it can be hard-deleted.static final int
static final String
Property for the maximum number of documents to delete in one call. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected int
Gets the minimum delay (in seconds) since when a document must have been soft-deleted before it can be hard-deleted.protected int
getMax()
Gets the maximum number of documents to delete in one call.void
handleEvent
(Event event) Handle the given event.
-
Field Details
-
DEFAULT_MAX
public static final int DEFAULT_MAX- See Also:
-
DEFAULT_MAX_PROP
Property for the maximum number of documents to delete in one call. Zero means all the documents. Default is 1000.- See Also:
-
DEFAULT_DELAY
public static final int DEFAULT_DELAY- See Also:
-
DEFAULT_DELAY_PROP
Property for the minimum delay (in seconds) since when a document must have been soft-deleted before it can be hard-deleted. Zero means no delay. Default is 300.- See Also:
-
-
Constructor Details
-
SoftDeleteCleanupListener
public SoftDeleteCleanupListener()
-
-
Method Details
-
getMax
protected int getMax()Gets the maximum number of documents to delete in one call. Zero means all the documents. -
getDelaySeconds
protected int getDelaySeconds()Gets the minimum delay (in seconds) since when a document must have been soft-deleted before it can be hard-deleted. Zero means no delay. -
handleEvent
Description copied from interface:EventListener
Handle the given event. The listener can cancel the event by callingEvent.cancel()
- Specified by:
handleEvent
in interfaceEventListener
- Parameters:
event
- the event
-