Package org.nuxeo.ecm.core.storage.sql
Class SoftDeleteCleanupListener
- java.lang.Object
-
- org.nuxeo.ecm.core.storage.sql.SoftDeleteCleanupListener
-
- All Implemented Interfaces:
EventListener
public class SoftDeleteCleanupListener extends Object implements EventListener
Sync listener that calls the soft delete cleanup method of the repositories. Designed to be called periodically.- Since:
- 5.7
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_DELAY
static String
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.static int
DEFAULT_MAX
static String
DEFAULT_MAX_PROP
Property for the maximum number of documents to delete in one call.
-
Constructor Summary
Constructors Constructor Description SoftDeleteCleanupListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
getDelaySeconds()
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 Detail
-
DEFAULT_MAX
public static final int DEFAULT_MAX
- See Also:
- Constant Field Values
-
DEFAULT_MAX_PROP
public static final String 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:
- Constant Field Values
-
DEFAULT_DELAY
public static final int DEFAULT_DELAY
- See Also:
- Constant Field Values
-
DEFAULT_DELAY_PROP
public static final String 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:
- Constant Field Values
-
-
Constructor Detail
-
SoftDeleteCleanupListener
public SoftDeleteCleanupListener()
-
-
Method Detail
-
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
public void handleEvent(Event event)
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
-
-