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 class
TarFiles.Builder
static class
TarFiles.CleanupResult
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TarFiles.Builder
builder()
TarFiles.CleanupResult
cleanup(CleanupContext context)
void
close()
void
collectBlobReferences(Consumer<String> collector, Predicate<GCGeneration> reclaim)
boolean
containsSegment(long msb, long lsb)
FileReaper
createFileReaper()
void
flush()
Map<UUID,Set<UUID>>
getGraph(String fileName)
Map<String,Set<UUID>>
getIndices()
Iterable<UUID>
getSegmentIds()
void
init()
int
readerCount()
Buffer
readSegment(long msb, long lsb)
int
segmentCount()
long
size()
String
toString()
void
writeSegment(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:
close
in interfaceAutoCloseable
- Specified by:
close
in 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()
-
-