Package net.metanotion.io.block.index
Class BSkipList<K extends Comparable<? super K>,V>
java.lang.Object
net.metanotion.util.skiplist.SkipList<K,V>
net.metanotion.io.block.index.BSkipList<K,V>
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
,Iterable<V>
public class BSkipList<K extends Comparable<? super K>,V>
extends SkipList<K,V>
implements Closeable
On-disk format:
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.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionBSkipList
(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) -
Method Summary
Methods inherited from class net.metanotion.util.skiplist.SkipList
addItem, balance, delItem, generateColHeight, get, print, printSL, put, remove, size
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
firstSpanPage
public int firstSpanPage -
firstLevelPage
public int firstLevelPage -
skipPage
public int skipPage -
bf
-
spanHash
-
levelHash
-
-
Constructor Details
-
BSkipList
public BSkipList(int spanSize, BlockFile bf, int skipPage, Serializer<K> key, Serializer<V> val) throws IOException - Throws:
IOException
-
BSkipList
public BSkipList(int spanSize, BlockFile bf, int skipPage, Serializer<K> key, Serializer<V> val, boolean fileOnly) throws IOException - Throws:
IOException
-
-
Method Details
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
flush
public void flush() -
delete
must be open (do not call close() first)- Throws:
IOException
-
init
- Throws:
IOException
-
maxLevels
public int maxLevels() -
iterator
-
find
find -
bslck
public boolean bslck(boolean fix, boolean isMeta) Run an integrity check on the skiplist and all the levels in it- Returns:
- true if the levels were modified.
-
toString
-