Class BinaryReferencesIndexWriter
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.file.tar.binaries.BinaryReferencesIndexWriter
-
public class BinaryReferencesIndexWriter extends Object
Maintains the transient state of a binary references index, formats it and serializes it.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEntry(int generation, int full, boolean compacted, UUID segment, String reference)
Add an entry to the binary references index.static BinaryReferencesIndexWriter
newBinaryReferencesIndexWriter()
Create a new, empty instance ofBinaryReferencesIndexWriter
.byte[]
write()
Write the current state of this instance to an array of bytes.
-
-
-
Method Detail
-
newBinaryReferencesIndexWriter
public static BinaryReferencesIndexWriter newBinaryReferencesIndexWriter()
Create a new, empty instance ofBinaryReferencesIndexWriter
.- Returns:
- An instance of
BinaryReferencesIndexWriter
.
-
addEntry
public void addEntry(int generation, int full, boolean compacted, UUID segment, String reference)
Add an entry to the binary references index.- Parameters:
generation
- The generation of the segment containing the reference.full
- The full generation of the segment containing the reference.compacted
-true
if the segment containing the reference is created by a compaction operation.segment
- The identifier of the segment containing the reference.reference
- The binary reference.
-
write
public byte[] write()
Write the current state of this instance to an array of bytes.- Returns:
- An array of bytes containing the serialized state of the binary references index.
-
-