Class TarFiles
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.file.tar.TarFiles
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class TarFiles extends java.lang.Object implements java.io.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(java.util.function.Consumer<java.lang.String> collector, org.apache.jackrabbit.guava.common.base.Predicate<GCGeneration> reclaim)
boolean
containsSegment(long msb, long lsb)
FileReaper
createFileReaper()
void
flush()
java.util.Map<java.util.UUID,java.util.Set<java.util.UUID>>
getGraph(java.lang.String fileName)
java.util.Map<java.lang.String,java.util.Set<java.util.UUID>>
getIndices()
java.lang.Iterable<java.util.UUID>
getSegmentIds()
void
init()
int
readerCount()
Buffer
readSegment(long msb, long lsb)
int
segmentCount()
long
size()
java.lang.String
toString()
void
writeSegment(java.util.UUID id, byte[] buffer, int offset, int length, GCGeneration generation, java.util.Set<java.util.UUID> references, java.util.Set<java.lang.String> binaryReferences)
-
-
-
Method Detail
-
builder
public static TarFiles.Builder builder()
-
init
public void init() throws java.io.IOException
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
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 java.io.IOException
- Throws:
java.io.IOException
-
containsSegment
public boolean containsSegment(long msb, long lsb)
-
readSegment
public Buffer readSegment(long msb, long lsb)
-
writeSegment
public void writeSegment(java.util.UUID id, byte[] buffer, int offset, int length, GCGeneration generation, java.util.Set<java.util.UUID> references, java.util.Set<java.lang.String> binaryReferences) throws java.io.IOException
- Throws:
java.io.IOException
-
cleanup
public TarFiles.CleanupResult cleanup(CleanupContext context) throws java.io.IOException
- Throws:
java.io.IOException
-
collectBlobReferences
public void collectBlobReferences(java.util.function.Consumer<java.lang.String> collector, org.apache.jackrabbit.guava.common.base.Predicate<GCGeneration> reclaim) throws java.io.IOException
- Throws:
java.io.IOException
-
getSegmentIds
public java.lang.Iterable<java.util.UUID> getSegmentIds()
-
getGraph
public java.util.Map<java.util.UUID,java.util.Set<java.util.UUID>> getGraph(java.lang.String fileName) throws java.io.IOException
- Throws:
java.io.IOException
-
getIndices
public java.util.Map<java.lang.String,java.util.Set<java.util.UUID>> getIndices()
-
createFileReaper
public FileReaper createFileReaper()
-
-