Class MemoryBlobStore

java.lang.Object
org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore
org.apache.jackrabbit.oak.spi.blob.MemoryBlobStore
All Implemented Interfaces:
AutoCloseable, Cache.Backend<AbstractBlobStore.BlockId,AbstractBlobStore.Data>, BlobStore, GarbageCollectableBlobStore

public class MemoryBlobStore extends AbstractBlobStore
A memory blob store. Useful for testing.
  • Constructor Details

    • MemoryBlobStore

      public MemoryBlobStore()
  • Method Details

    • startMark

      public void startMark() throws IOException
      Description copied from interface: GarbageCollectableBlobStore
      Start the mark phase.
      Specified by:
      startMark in interface GarbageCollectableBlobStore
      Specified by:
      startMark in class AbstractBlobStore
      Throws:
      IOException
    • sweep

      public int sweep()
      Description copied from interface: GarbageCollectableBlobStore
      Remove all unused blocks.
      Specified by:
      sweep in interface GarbageCollectableBlobStore
      Specified by:
      sweep in class AbstractBlobStore
      Returns:
      the number of removed blocks
    • countDeleteChunks

      public long countDeleteChunks(List<String> chunkIds, long maxLastModifiedTime) throws Exception
      Ignores the maxlastModifiedTime
      Parameters:
      chunkIds - the chunk ids
      maxLastModifiedTime - the max last modified time to consider for retrieval, with the special value '0' meaning no filtering by time
      Returns:
      long the count of successful deletions
      Throws:
      Exception - the exception
    • getAllChunkIds

      public Iterator<String> getAllChunkIds(long maxLastModifiedTime) throws Exception
      Ignores the maxlastModifiedTime
      Parameters:
      maxLastModifiedTime - the max last modified time to consider for retrieval, with the special value '0' meaning no filtering by time
      Returns:
      the identifiers
      Throws:
      Exception - the exception
    • clearCache

      public void clearCache()
      Description copied from interface: GarbageCollectableBlobStore
      Clear the cache.