Class AbstractBlockPackedWriter
- java.lang.Object
-
- org.apache.cassandra.index.sai.disk.v1.bitpack.AbstractBlockPackedWriter
-
- Direct Known Subclasses:
BlockPackedWriter
,MonotonicBlockPackedWriter
public abstract class AbstractBlockPackedWriter extends java.lang.Object
Modified copy oforg.apache.lucene.util.packed.AbstractBlockPackedWriter
to useDirectWriter
for optimised reads that doesn't require seeking through the whole file to open a thread-exclusive reader.
-
-
Field Summary
Fields Modifier and Type Field Description protected int
blockIndex
protected ResettableByteBuffersIndexOutput
blockMetaWriter
protected long[]
blockValues
protected boolean
finished
protected org.apache.lucene.store.IndexOutput
indexOutput
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
add(long l)
Append a new long.long
finish()
Flush all buffered data to disk.protected abstract void
flushBlock()
-
-
-
Field Detail
-
indexOutput
protected final org.apache.lucene.store.IndexOutput indexOutput
-
blockValues
protected final long[] blockValues
-
blockMetaWriter
protected final ResettableByteBuffersIndexOutput blockMetaWriter
-
blockIndex
protected int blockIndex
-
finished
protected boolean finished
-
-
Method Detail
-
add
public void add(long l) throws java.io.IOException
Append a new long.- Throws:
java.io.IOException
-
finish
public long finish() throws java.io.IOException
Flush all buffered data to disk. This instance is not usable anymore after this method has been called.- Returns:
- a file offset to the block metadata
- Throws:
java.io.IOException
-
flushBlock
protected abstract void flushBlock() throws java.io.IOException
- Throws:
java.io.IOException
-
-