public class FileStore extends AbstractFileStore
Modifier and Type | Method and Description |
---|---|
void |
cancelGC()
Cancel a running revision garbage collection compaction process as soon as possible.
|
void |
cleanup()
Run garbage collection on the segment level: reclaim those data segments
that are from an old segment generation and those bulk segments that are not
reachable anymore.
|
void |
close() |
void |
collectBlobReferences(org.apache.jackrabbit.oak.plugins.blob.ReferenceCollector collector)
Finds all external blob references that are currently accessible
in this repository and adds them to the given collector.
|
boolean |
compact()
Copy every referenced record in data (non-bulk) segments.
|
boolean |
containsSegment(SegmentId id)
Checks whether the identified segment exists in this store.
|
GCEstimation |
estimateCompactionGain()
Run the compaction gain estimation process.
|
void |
flush() |
void |
gc()
Run garbage collection: estimation, compaction, cleanup
|
Runnable |
getGCRunner() |
org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean |
getNodeDeduplicationCacheStats() |
TarRevisions |
getRevisions() |
FileStoreStats |
getStats() |
org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean |
getStringDeduplicationCacheStats() |
org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean |
getTemplateDeduplicationCacheStats() |
SegmentWriter |
getWriter() |
int |
readerCount() |
Segment |
readSegment(SegmentId id)
Reads the identified segment from this store.
|
void |
writeSegment(SegmentId id,
byte[] buffer,
int offset,
int length)
Writes the given segment to the segment store.
|
getBlobStore, getHead, getReader, getSegmentCacheStats, getStringCacheStats, getTemplateCacheStats, getTracker, newBulkSegmentId, newDataSegmentId, newSegmentId
@CheckForNull public org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean getStringDeduplicationCacheStats()
@CheckForNull public org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean getTemplateDeduplicationCacheStats()
@CheckForNull public org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean getNodeDeduplicationCacheStats()
public Runnable getGCRunner()
public int readerCount()
public FileStoreStats getStats()
public void flush() throws IOException
IOException
public void gc() throws IOException
IOException
public GCEstimation estimateCompactionGain()
public boolean compact()
true
on success, false
otherwise.public void cleanup() throws IOException
IOException
public void collectBlobReferences(org.apache.jackrabbit.oak.plugins.blob.ReferenceCollector collector) throws IOException
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.
collector
- reference collector called back for each blob reference foundIOException
public void cancelGC()
@Nonnull public SegmentWriter getWriter()
getWriter
in class AbstractFileStore
@Nonnull public TarRevisions getRevisions()
getRevisions
in class AbstractFileStore
Revisions
object bound to the current store.public void close()
public boolean containsSegment(SegmentId id)
SegmentStore
id
- segment identifiertrue
if the segment exists, false
otherwise@Nonnull public Segment readSegment(SegmentId id)
SegmentStore
id
- segment identifierSegmentNotFoundException
thrown if not foundpublic void writeSegment(SegmentId id, byte[] buffer, int offset, int length) throws IOException
SegmentStore
id
- segment identifierbuffer
- byte buffer that contains the raw contents of the segmentoffset
- start offset within the byte bufferlength
- length of the segmentIOException
Copyright © 2012-2019 The Apache Software Foundation. All Rights Reserved.