Class MonotonicBlockPackedWriter

java.lang.Object
org.apache.cassandra.index.sai.disk.v1.bitpack.AbstractBlockPackedWriter
org.apache.cassandra.index.sai.disk.v1.bitpack.MonotonicBlockPackedWriter

public class MonotonicBlockPackedWriter extends AbstractBlockPackedWriter
A writer for large monotonically increasing sequences of positive longs. The writer is optimised for monotonic sequences and stores values as a series of deltas from an expected value. The expected value is calculated from the minimum value in the block and the average delta for the block. This means that stored values are generally smaller and can be packed into a smaller number of bits, allowing for larger block sizes. Modified copy of MonotonicBlockPackedWriter to use DirectWriter for optimised reads that doesn't require seeking through the whole file to open a thread-exclusive reader.