public class IndexWriter extends Object
Modifier and Type | Method and Description |
---|---|
void |
addEntry(long msb,
long lsb,
int offset,
int size,
int generation,
int fullGeneration,
boolean isCompacted)
Add an entry to this index.
|
static IndexWriter |
newIndexWriter(int blockSize)
Create a new
IndexWriter for the specified block size. |
byte[] |
write()
Serializes the content of the index.
|
public static IndexWriter newIndexWriter(int blockSize)
IndexWriter
for the specified block size. The block
size is needed to ensure that the data produced by the returned IndexWriter
is aligned to a specified boundary, i.e. is a multiple of
the block size.blockSize
- The block size. It must be strictly positive.IndexWriter
.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()
IndexWriter
was created.Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.