Class NullAwareCharReverseSegmentedSortedArray

java.lang.Object
com.illumon.iris.db.v2.ssa.NullAwareCharReverseSegmentedSortedArray
All Implemented Interfaces:
LongSizedDataStructure, SegmentedSortedArray

public final class NullAwareCharReverseSegmentedSortedArray extends Object implements SegmentedSortedArray
For keeping track of incremental states of sorted values, we would ideally like to hold them in an Array or a Chunk; with parallel index keys. However, if we just put them in an array we can not insert or remove values without unnecessarily shifting everything. The segmented array allows us to either insert or remove elements and only shift values in a "leaf" block and possibly a "directory" block. It can be thought of as similar to a single-level b+ tree with only keys. We must be totally ordered, which is accomplished by sorting on the char values, and then on the corresponding index key.