java.lang.Object
com.atlassian.confluence.impl.space.deletion.backgrounddeletion.erasers.DeletionResult

public class DeletionResult extends Object
Data deletion result. Contains info about number of deleted records plus the status (finished or not). "Finished" state is important. As we delete data in chunks and take the deadline into account, some expected data won't be deleted, so we will have to repeat the same operation again next time. For example, if we want to remove 100K child pages, but only 50K were removed in the current iteration, flag "finished" will be set to "false". So next time, the remaining objects will be removed and the flag will be set to "true".
Since:
9.1.0
  • Field Details

  • Constructor Details

    • DeletionResult

      public DeletionResult(int numberOfObjects, boolean finished)
  • Method Details

    • notFinishedResults

      public static DeletionResult notFinishedResults()
    • notFinishedResults

      public static DeletionResult notFinishedResults(int numberOfObjects)
    • finishedResults

      public static DeletionResult finishedResults()
    • finishedResults

      public static DeletionResult finishedResults(int numberOfObjects)
    • isFinished

      public boolean isFinished()
    • getNumberOfObjects

      public int getNumberOfObjects()
    • merge

      public DeletionResult merge(DeletionResult otherResults)
      On merging, we summarise number of objects and mark it as finished only if both results are finished.
      Parameters:
      otherResults - another deletion results
      Returns:
      combined results.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object