Class AbstractFileStore

java.lang.Object
org.apache.jackrabbit.oak.segment.file.AbstractFileStore
All Implemented Interfaces:
Closeable, AutoCloseable, SegmentStore
Direct Known Subclasses:
FileStore, ReadOnlyFileStore

public abstract class AbstractFileStore extends Object implements SegmentStore, Closeable
The storage implementation for tar files.
  • Field Details

    • ioMonitor

      protected final IOMonitor ioMonitor
    • remoteStoreMonitor

      protected final RemoteStoreMonitor remoteStoreMonitor
    • binariesInlineThreshold

      protected final int binariesInlineThreshold
  • Method Details

    • getSegmentCacheStats

      @NotNull public @NotNull CacheStatsMBean getSegmentCacheStats()
    • getStringCacheStats

      @NotNull public @NotNull CacheStatsMBean getStringCacheStats()
    • getTemplateCacheStats

      @NotNull public @NotNull CacheStatsMBean getTemplateCacheStats()
    • getWriter

      @NotNull public abstract @NotNull SegmentWriter getWriter()
    • getReader

      @NotNull public @NotNull SegmentReader getReader()
    • getSegmentIdProvider

      @NotNull public @NotNull SegmentIdProvider getSegmentIdProvider()
    • getBinariesInlineThreshold

      public int getBinariesInlineThreshold()
    • getRevisions

      public abstract Revisions getRevisions()
      Returns:
      the Revisions object bound to the current store.
    • getHead

      @NotNull public @NotNull SegmentNodeState getHead()
      Convenience method for accessing the root node for the current head. This is equivalent to
       fileStore.getReader().readHeadState(fileStore.getRevisions())
       
      Returns:
      the current head node state
    • getBlobStore

      @Nullable public @Nullable BlobStore getBlobStore()
      Returns:
      the external BlobStore (if configured) with this store, null otherwise.
    • collectBlobReferences

      public abstract void collectBlobReferences(Consumer<String> collector) throws IOException
      Finds all external blob references that are currently accessible in this repository and adds them to the given collector. Useful for collecting garbage in an external data store.

      Note that this method only collects blob references that are already stored in the repository (at the time when this method is called), so the garbage collector will need some other mechanism for tracking in-memory references and references stored while this method is running.

      Parameters:
      collector - reference collector called back for each blob reference found
      Throws:
      IOException