public class IndexWriter extends Object
|Modifier and Type||Method and Description|
Add an entry to this index.
Create a new
Serializes the content of the index.
public static IndexWriter newIndexWriter(int blockSize)
IndexWriterfor the specified block size. The block size is needed to ensure that the data produced by the returned
IndexWriteris aligned to a specified boundary, i.e. is a multiple of the block size.
blockSize- The block size. It must be strictly positive.
public void addEntry(long msb, long lsb, int offset, int size, int generation, int fullGeneration, boolean isCompacted)
msb- The most significant bits of the entry identifier.
lsb- The least significant bits of the entry identifier.
offset- The position of the entry in the file.
size- The size of the entry.
generation- The generation of the entry.
fullGeneration- The full generation of the entry.
isCompacted- Whether the entry is generated as part of a compaction operation.
public byte write()
Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.