Enum Class CleanupScanUnitState

java.lang.Object
java.lang.Enum<CleanupScanUnitState>
org.exoplatform.addons.documents.cleanup.constant.CleanupScanUnitState
All Implemented Interfaces:
Serializable, Comparable<CleanupScanUnitState>, Constable

public enum CleanupScanUnitState extends Enum<CleanupScanUnitState>
State of a single dry-run scan unit (a partition of the scanned tree walked by ONE reader thread). DONE is terminal for the planner, and it is the only state that is terminal ON ITS OWN: a unit left RUNNING by an interrupted run, and a FAILED one, are both picked up again by the next run — from their own persisted path checkpoint.

FAILED is terminal only TOGETHER WITH its attempt count: a unit that spent CleanupScanService#MAX_SCAN_UNIT_ATTEMPTS walks is settled-failed, so CleanupScanUnitStorage#getUnitsToProcess stops handing it out and it stops holding the dry-run's completion back. That pairing is why the exclusion is state-AWARE: an attempt count alone would also settle a RUNNING unit, which must never be settled — nothing else would ever give it an outcome.

  • Enum Constant Details

  • Method Details

    • values

      public static CleanupScanUnitState[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CleanupScanUnitState valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null