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 Details

    • DEFAULT_MAX

      public static final int DEFAULT_MAX
      See Also:
    • 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:
    • DEFAULT_DELAY

      public static final int DEFAULT_DELAY
      See Also:
    • 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:
  • 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

      public void handleEvent(Event event)
      Description copied from interface: EventListener
      Handle the given event. The listener can cancel the event by calling Event.cancel()
      Specified by:
      handleEvent in interface EventListener
      Parameters:
      event - the event