Class GarbageCollectorFileState

java.lang.Object
org.apache.jackrabbit.oak.plugins.blob.GarbageCollectorFileState
All Implemented Interfaces:
Closeable, AutoCloseable

public class GarbageCollectorFileState extends Object implements Closeable
Class for keeping the file system state of the garbage collection. Also, manages any temporary files needed as well as external sorting.
  • Constructor Details

    • GarbageCollectorFileState

      public GarbageCollectorFileState(String root) throws IOException
      Instantiates a new garbage collector file state.
      Parameters:
      root - path of the root directory under which the files created during gc are stored
      Throws:
      IOException
  • Method Details

    • getMarkedRefs

      public File getMarkedRefs()
      Gets the file storing the marked references.
      Returns:
      the marked references
    • getAvailableRefs

      public File getAvailableRefs()
      Gets the file storing the available references.
      Returns:
      the available references
    • getGcCandidates

      public File getGcCandidates()
      Gets the file storing the gc candidates.
      Returns:
      the gc candidates
    • getGarbage

      public File getGarbage()
      Gets the storing the garbage.
      Returns:
      the garbage
    • close

      public void close() throws IOException
      Completes the process by deleting the files.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException - Signals that an I/O exception has occurred.