public class BSkipList<K extends Comparable<? super K>,V> extends SkipList<K,V> implements Closeable
Magic number (long) first span page (unsigned int) first level page (unsigned int) size (unsigned int) spans (unsigned int) levels (unsigned int)Always fits on one page.
Modifier and Type | Field and Description |
---|---|
BlockFile |
bf |
int |
firstLevelPage |
int |
firstSpanPage |
(package private) HashMap<Integer,SkipLevels<K,V>> |
levelHash |
int |
skipPage |
(package private) HashMap<Integer,BSkipSpan<K,V>> |
spanHash |
Constructor and Description |
---|
BSkipList(int spanSize,
BlockFile bf,
int skipPage,
Serializer<K> key,
Serializer<V> val) |
BSkipList(int spanSize,
BlockFile bf,
int skipPage,
Serializer<K> key,
Serializer<V> val,
boolean fileOnly) |
Modifier and Type | Method and Description |
---|---|
boolean |
bslck(boolean fix,
boolean isMeta)
Run an integrity check on the skiplist and all the levels in it
|
void |
close() |
void |
delete()
must be open (do not call close() first)
|
SkipIterator<K,V> |
find(K key)
find
|
void |
flush() |
static void |
init(BlockFile bf,
int page,
int spanSize) |
SkipIterator<K,V> |
iterator() |
int |
maxLevels() |
String |
toString() |
public int firstSpanPage
public int firstLevelPage
public int skipPage
public final BlockFile bf
final HashMap<Integer,SkipLevels<K extends Comparable<? super K>,V>> levelHash
public BSkipList(int spanSize, BlockFile bf, int skipPage, Serializer<K> key, Serializer<V> val) throws IOException
IOException
public BSkipList(int spanSize, BlockFile bf, int skipPage, Serializer<K> key, Serializer<V> val, boolean fileOnly) throws IOException
IOException
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public void flush()
public void delete() throws IOException
IOException
public static void init(BlockFile bf, int page, int spanSize) throws IOException
IOException
public int maxLevels()
public SkipIterator<K,V> iterator()
public SkipIterator<K,V> find(K key)
public boolean bslck(boolean fix, boolean isMeta)