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 Summary
Fields Modifier and Type Field Description protected int
binariesInlineThreshold
protected IOMonitor
ioMonitor
protected RemoteStoreMonitor
remoteStoreMonitor
-
Fields inherited from interface org.apache.jackrabbit.oak.segment.SegmentStore
EMPTY_STORE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
collectBlobReferences(Consumer<String> collector)
Finds all external blob references that are currently accessible in this repository and adds them to the given collector.int
getBinariesInlineThreshold()
@Nullable BlobStore
getBlobStore()
@NotNull SegmentNodeState
getHead()
Convenience method for accessing the root node for the current head.@NotNull SegmentReader
getReader()
abstract Revisions
getRevisions()
@NotNull CacheStatsMBean
getSegmentCacheStats()
@NotNull SegmentIdProvider
getSegmentIdProvider()
@NotNull CacheStatsMBean
getStringCacheStats()
@NotNull CacheStatsMBean
getTemplateCacheStats()
abstract @NotNull SegmentWriter
getWriter()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.jackrabbit.oak.segment.SegmentStore
containsSegment, readSegment, writeSegment
-
-
-
-
Field Detail
-
ioMonitor
protected final IOMonitor ioMonitor
-
remoteStoreMonitor
protected final RemoteStoreMonitor remoteStoreMonitor
-
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()
-
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 tofileStore.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
-
-