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 intbinariesInlineThresholdprotected IOMonitorioMonitorprotected @Nullable PersistentCachepersistentCacheprotected RemoteStoreMonitorremoteStoreMonitor-
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 voidclose()abstract voidcollectBlobReferences(Consumer<String> collector)Finds all external blob references that are currently accessible in this repository and adds them to the given collector.protected voiddoClose()intgetBinariesInlineThreshold()@Nullable BlobStoregetBlobStore()@NotNull SegmentNodeStategetHead()Convenience method for accessing the root node for the current head.@NotNull SegmentReadergetReader()abstract RevisionsgetRevisions()@NotNull CacheStatsMBeangetSegmentCacheStats()@NotNull SegmentIdProvidergetSegmentIdProvider()@NotNull CacheStatsMBeangetStringCacheStats()@NotNull CacheStatsMBeangetTemplateCacheStats()abstract @NotNull SegmentWritergetWriter()protected voidregisterCloseables(Closer closer)-
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
-
persistentCache
@Nullable protected final @Nullable PersistentCache persistentCache
-
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
Revisionsobject 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,
nullotherwise.
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
doClose
protected void doClose()
-
registerCloseables
protected void registerCloseables(Closer closer)
-
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
-
-