public class BSkipLevels<K extends Comparable<? super K>,V> extends SkipLevels<K,V>
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.
Modifier and Type | Field and Description |
---|---|
BlockFile |
bf |
(package private) static int |
HEADER_LEN |
int |
levelPage |
int |
spanPage |
bottom, levels, MAX_SIZE
Constructor and Description |
---|
BSkipLevels(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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
blvlck(boolean fix)
Run an integrity check on the skiplevels from the first,
or just fix it if fix == true.
|
boolean |
blvlck(boolean fix,
int width,
SkipLevels<K,V>[] prevLevels) |
void |
flush() |
static void |
init(BlockFile bf,
int page,
int spanPage,
int maxHeight) |
void |
initializeLevels()
Non-recursive initializer.
|
void |
killInstance() |
SkipLevels<K,V> |
newInstance(int levels,
SkipSpan<K,V> ss,
SkipList<K,V> sl) |
String |
toString() |
static final int HEADER_LEN
public final int levelPage
public final int spanPage
public final BlockFile bf
public BSkipLevels(BlockFile bf, int levelPage, BSkipList<K,V> bsl) throws IOException
IOException
public void initializeLevels()
public static void init(BlockFile bf, int page, int spanPage, int maxHeight) throws IOException
IOException
public void flush()
flush
in interface Flushable
flush
in class SkipLevels<K extends Comparable<? super K>,V>
public void killInstance()
killInstance
in class SkipLevels<K extends Comparable<? super K>,V>
public SkipLevels<K,V> newInstance(int levels, SkipSpan<K,V> ss, SkipList<K,V> sl)
newInstance
in class SkipLevels<K extends Comparable<? super K>,V>
public boolean blvlck(boolean fix)
blvlck
in class SkipLevels<K extends Comparable<? super K>,V>
public boolean blvlck(boolean fix, int width, SkipLevels<K,V>[] prevLevels)
blvlck
in class SkipLevels<K extends Comparable<? super K>,V>