Class TarFiles
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.file.tar.TarFiles
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class TarFiles extends Object implements Closeable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTarFiles.Builderstatic classTarFiles.CleanupResult
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TarFiles.Builderbuilder()TarFiles.CleanupResultcleanup(CleanupContext context)voidclose()voidcollectBlobReferences(Consumer<String> collector, Predicate<GCGeneration> reclaim)booleancontainsSegment(long msb, long lsb)FileReapercreateFileReaper()voidflush()Map<UUID,Set<UUID>>getGraph(String fileName)Map<String,Set<UUID>>getIndices()Iterable<UUID>getSegmentIds()voidinit()intreaderCount()BufferreadSegment(long msb, long lsb)intsegmentCount()longsize()StringtoString()voidwriteSegment(UUID id, byte[] buffer, int offset, int length, GCGeneration generation, Set<UUID> references, Set<String> binaryReferences)
-
-
-
Method Detail
-
builder
public static TarFiles.Builder builder()
-
init
public void init() throws IOException- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
size
public long size()
-
readerCount
public int readerCount()
-
segmentCount
public int segmentCount()
- Returns:
- the number of segments in the segment store
-
flush
public void flush() throws IOException- Throws:
IOException
-
containsSegment
public boolean containsSegment(long msb, long lsb)
-
readSegment
public Buffer readSegment(long msb, long lsb)
-
writeSegment
public void writeSegment(UUID id, byte[] buffer, int offset, int length, GCGeneration generation, Set<UUID> references, Set<String> binaryReferences) throws IOException
- Throws:
IOException
-
cleanup
public TarFiles.CleanupResult cleanup(CleanupContext context) throws IOException
- Throws:
IOException
-
collectBlobReferences
public void collectBlobReferences(Consumer<String> collector, Predicate<GCGeneration> reclaim) throws IOException
- Throws:
IOException
-
getGraph
public Map<UUID,Set<UUID>> getGraph(String fileName) throws IOException
- Throws:
IOException
-
createFileReaper
public FileReaper createFileReaper()
-
-