Package net.metanotion.io.block.index
Class BSkipLevels<K extends Comparable<? super K>,V>
java.lang.Object
net.metanotion.util.skiplist.SkipLevels<K,V>
net.metanotion.io.block.index.BSkipLevels<K,V>
- All Implemented Interfaces:
Flushable
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 Summary
FieldsModifier and TypeFieldDescriptionfinal BlockFile(package private) static final intfinal intfinal intFields inherited from class net.metanotion.util.skiplist.SkipLevels
bottom, levels, MAX_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionBSkipLevels(BlockFile bf, int levelPage, BSkipList<K, V> bsl) 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. -
Method Summary
Modifier and TypeMethodDescriptionbooleanblvlck(boolean fix) Run an integrity check on the skiplevels from the first, or just fix it if fix == true.booleanblvlck(boolean fix, int width, SkipLevels<K, V>[] prevLevels) voidflush()static voidvoidNon-recursive initializer.voidSkipLevels<K,V> toString()
-
Field Details
-
HEADER_LEN
static final int HEADER_LEN- See Also:
-
levelPage
public final int levelPage -
spanPage
public final int spanPage -
bf
-
-
Constructor Details
-
BSkipLevels
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 Details
-
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
-
init
- Throws:
IOException
-
flush
public void flush()- Specified by:
flushin interfaceFlushable- Overrides:
flushin classSkipLevels<K extends Comparable<? super K>,V>
-
killInstance
public void killInstance()- Overrides:
killInstancein classSkipLevels<K extends Comparable<? super K>,V>
-
newInstance
- Overrides:
newInstancein classSkipLevels<K extends Comparable<? super K>,V>
-
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:
blvlckin classSkipLevels<K extends Comparable<? super K>,V> - Returns:
- true if the levels were modified.
-
blvlck
- Overrides:
blvlckin classSkipLevels<K extends Comparable<? super K>,V>
-
toString
-