public final class DirectMonotonicWriter extends Object
DirectWriter.DirectMonotonicReader| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_BLOCK_SHIFT |
static int |
MIN_BLOCK_SHIFT |
| Modifier and Type | Method and Description |
|---|---|
void |
add(long v)
Write a new value.
|
void |
finish()
This must be called exactly once after all values have been
added. |
static DirectMonotonicWriter |
getInstance(IndexOutput metaOut,
IndexOutput dataOut,
long numValues,
int blockShift)
Returns an instance suitable for encoding
numValues into monotonic
blocks of 2blockShift values. |
public static final int MIN_BLOCK_SHIFT
public static final int MAX_BLOCK_SHIFT
public void add(long v)
throws IOException
finish() is called.IllegalArgumentException - if values don't come in orderIOExceptionpublic void finish()
throws IOException
added.IOExceptionpublic static DirectMonotonicWriter getInstance(IndexOutput metaOut, IndexOutput dataOut, long numValues, int blockShift)
numValues into monotonic
blocks of 2blockShift values. Metadata will be written
to metaOut and actual data to dataOut.Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.