Class MarkSweepGarbageCollector

java.lang.Object
org.apache.jackrabbit.oak.plugins.blob.MarkSweepGarbageCollector
All Implemented Interfaces:
BlobGarbageCollector

public class MarkSweepGarbageCollector extends Object implements BlobGarbageCollector
Mark and sweep garbage collector. Uses the file system to store internal state while in process to account for huge data. This class is not thread safe.
  • Field Details

  • Constructor Details

    • MarkSweepGarbageCollector

      public MarkSweepGarbageCollector(BlobReferenceRetriever marker, GarbageCollectableBlobStore blobStore, Executor executor, String root, int batchCount, long maxLastModifiedInterval, boolean checkConsistencyAfterGc, boolean sweepIfRefsPastRetention, @Nullable @Nullable String repositoryId, @Nullable @Nullable Whiteboard whiteboard, @Nullable @Nullable StatisticsProvider statisticsProvider) throws IOException
      Creates an instance of MarkSweepGarbageCollector
      Parameters:
      marker - BlobReferenceRetriever instanced used to fetch refereed blob entries
      blobStore - the blob store instance
      executor - executor
      root - the root absolute path of directory under which temporary files would be created
      batchCount - batch sized used for saving intermediate state
      maxLastModifiedInterval - lastModifiedTime in millis. Only files with time less than this time would be considered for GC
      repositoryId - unique repository id for this node
      whiteboard - whiteboard instance
      statisticsProvider - statistics provider instance
      Throws:
      IOException
    • MarkSweepGarbageCollector

      public MarkSweepGarbageCollector(BlobReferenceRetriever marker, GarbageCollectableBlobStore blobStore, Executor executor, String root, int batchCount, long maxLastModifiedInterval, @Nullable @Nullable String repositoryId) throws IOException
      Throws:
      IOException
    • MarkSweepGarbageCollector

      public MarkSweepGarbageCollector(BlobReferenceRetriever marker, GarbageCollectableBlobStore blobStore, Executor executor, long maxLastModifiedInterval, @Nullable @Nullable String repositoryId, @Nullable @Nullable Whiteboard whiteboard, @Nullable @Nullable StatisticsProvider statisticsProvider) throws IOException
      Instantiates a new blob garbage collector.
      Throws:
      IOException
  • Method Details