public static class FileStore.ReadOnlyStore extends FileStore
FileStore
implementation that supports
going back to old revisions.
All write methods are no-ops.
FileStore.ReadOnlyStore
Modifier and Type | Method and Description |
---|---|
LinkedList<File> |
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.
|
boolean |
compact()
Copy every referenced record in data (non-bulk) segments.
|
void |
flush()
no-op
|
void |
gc()
Trigger a garbage collection cycle
|
void |
maybeCompact(boolean cleanup) |
void |
setRevision(String revision)
Go to the specified
revision |
void |
traverseSegmentGraph(Set<UUID> roots,
SegmentGraph.SegmentGraphVisitor visitor)
Build the graph of segments reachable from an initial set of segments
|
void |
writeSegment(SegmentId id,
byte[] data,
int offset,
int length)
Writes the given segment to the segment store.
|
close, collectBlobReferences, containsSegment, getBinaryReferenceConsumer, getBlobStore, getHead, getNodeDeduplicationCacheStats, getReader, getRevisions, getSegmentCacheStats, getSegmentIds, getStats, getStringCacheStats, getStringDeduplicationCacheStats, getTarGraph, getTarReaderIndex, getTemplateCacheStats, getTemplateDeduplicationCacheStats, getTracker, getWriter, newBulkSegmentId, newDataSegmentId, newSegmentId, readerCount, readSegment
public void setRevision(String revision)
revision
revision
- public void traverseSegmentGraph(@Nonnull Set<UUID> roots, @Nonnull SegmentGraph.SegmentGraphVisitor visitor) throws IOException
roots
- the initial set of segmentsvisitor
- visitor receiving call back while following the segment graphIOException
public void writeSegment(SegmentId id, byte[] data, int offset, int length)
SegmentStore
writeSegment
in interface SegmentStore
writeSegment
in class FileStore
id
- segment identifierdata
- byte buffer that contains the raw contents of the segmentoffset
- start offset within the byte bufferlength
- length of the segmentpublic LinkedList<File> cleanup()
FileStore
public void gc()
FileStore
public boolean compact()
FileStore
public void maybeCompact(boolean cleanup)
maybeCompact
in class FileStore
Copyright © 2012-2016 The Apache Software Foundation. All Rights Reserved.