Class BSkipLevels<K extends Comparable<? super K>,​V>

  • All Implemented Interfaces:
    Flushable

    public class BSkipLevels<K extends Comparable<? super K>,​V>
    extends SkipLevels<K,​V>
    On-disk format:
        Magic number (long)
        max height (unsigned short)
        non-null height (unsigned short)
        span page (unsigned int)
        height number of level pages (unsigned ints)
    
    Always fits on one page.
    • Field Detail

      • levelPage

        public final int levelPage
      • spanPage

        public final int spanPage
    • Constructor Detail

      • BSkipLevels

        public BSkipLevels​(BlockFile bf,
                           int levelPage,
                           BSkipList<K,​V> bsl)
                    throws IOException
        Non-recursive initializer initializeLevels() MUST be called on the first BSkipLevel in the skiplist after the constructor, unless it's a new empty level and init() was previously called.
        Throws:
        IOException
    • Method Detail

      • initializeLevels

        public void initializeLevels()
        Non-recursive initializer. MUST be called on the first BSkipLevel in the skiplist after the constructor, unless it's a new empty level and init() was previously called. Only call on the first skiplevel in the list!
        Since:
        0.9.20
      • blvlck

        public boolean blvlck​(boolean fix)
        Run an integrity check on the skiplevels from the first, or just fix it if fix == true. Only call from the first level.
        Overrides:
        blvlck in class SkipLevels<K extends Comparable<? super K>,​V>
        Returns:
        true if the levels were modified.