Class AbstractFileStore

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, SegmentStore
    Direct Known Subclasses:
    FileStore, ReadOnlyFileStore

    public abstract class AbstractFileStore
    extends java.lang.Object
    implements SegmentStore, java.io.Closeable
    The storage implementation for tar files.
    • Field Detail

      • ioMonitor

        protected final IOMonitor ioMonitor
      • binariesInlineThreshold

        protected final int binariesInlineThreshold
    • Method Detail

      • 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()
      • 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​(java.util.function.Consumer<java.lang.String> collector)
                                            throws java.io.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:
        java.io.IOException