Closeable, Flushable, AutoCloseable, Iterable<V>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 | 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 | 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 | 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() |
forEach, spliteratorpublic 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
IOExceptionpublic BSkipList(int spanSize,
BlockFile bf,
int skipPage,
Serializer<K> key,
Serializer<V> val,
boolean fileOnly)
throws IOException
IOExceptionpublic void close()
close in interface AutoCloseableclose in interface Closeablepublic void flush()
public void delete()
throws IOException
IOExceptionpublic static void init(BlockFile bf, int page, int spanSize) throws IOException
IOExceptionpublic int maxLevels()
public SkipIterator<K,V> iterator()
public SkipIterator<K,V> find(K key)
public boolean bslck(boolean fix,
boolean isMeta)