Class RevisionGC

java.lang.Object
org.apache.jackrabbit.oak.spi.state.RevisionGC
All Implemented Interfaces:
RevisionGCMBean

public class RevisionGC extends Object implements RevisionGCMBean
Default implementation of RevisionGCMBean based on a Runnable.
  • Field Details

  • Constructor Details

    • RevisionGC

      public RevisionGC(@NotNull @NotNull Runnable runGC, @NotNull @NotNull Runnable cancelGC, @NotNull @NotNull Supplier<String> statusMessage, @NotNull @NotNull Executor executor)
      Parameters:
      runGC - Revision garbage collector
      cancelGC - Executor for cancelling the garbage collection task
      statusMessage - an informal status message describing the status of the background operation at the time of invocation.
      executor - Executor for initiating the garbage collection task
    • RevisionGC

      public RevisionGC(@NotNull @NotNull Runnable runGC, @NotNull @NotNull Runnable cancelGC, @NotNull @NotNull Executor executor)
      Parameters:
      runGC - Revision garbage collector
      cancelGC - Executor for cancelling the garbage collection task
      executor - Executor for initiating the garbage collection task
  • Method Details

    • startRevisionGC

      @NotNull public @NotNull CompositeData startRevisionGC()
      Description copied from interface: RevisionGCMBean
      Initiate a revision garbage collection operation
      Specified by:
      startRevisionGC in interface RevisionGCMBean
      Returns:
      the status of the operation right after it was initiated
    • cancelRevisionGC

      @NotNull public @NotNull CompositeData cancelRevisionGC()
      Description copied from interface: RevisionGCMBean
      Cancel a running revision garbage collection operation. Does nothing if revision garbage collection is not running.
      Specified by:
      cancelRevisionGC in interface RevisionGCMBean
      Returns:
      the status of the operation right after it was initiated
    • getRevisionGCStatus

      @NotNull public @NotNull CompositeData getRevisionGCStatus()
      Description copied from interface: RevisionGCMBean
      Revision garbage collection status
      Specified by:
      getRevisionGCStatus in interface RevisionGCMBean
      Returns:
      the status of the ongoing operation or if none the terminal status of the last operation or Status not available if none.