public class NBPlusTreeStoreFixedDisk<K extends Comparable<K>,V> extends Object implements NBPlusTreeStore<K,V>, Closeable
| Modifier and Type | Class and Description |
|---|---|
static interface |
NBPlusTreeStoreFixedDisk.NBSerializer<T> |
| Constructor and Description |
|---|
NBPlusTreeStoreFixedDisk(File file,
int m,
boolean allowDuplicates,
NBPlusTreeStoreFixedDisk.NBSerializer<K> keySerializer,
NBPlusTreeStoreFixedDisk.NBSerializer<V> valSerializer) |
public NBPlusTreeStoreFixedDisk(File file, int m, boolean allowDuplicates, NBPlusTreeStoreFixedDisk.NBSerializer<K> keySerializer, NBPlusTreeStoreFixedDisk.NBSerializer<V> valSerializer) throws IOException
IOExceptionpublic int m()
m in interface NBPlusTreeStore<K extends Comparable<K>,V>public boolean isAllowDuplicates()
isAllowDuplicates in interface NBPlusTreeStore<K extends Comparable<K>,V>public long size()
size in interface NBPlusTreeStore<K extends Comparable<K>,V>public void incSize(long sizeDiff)
incSize in interface NBPlusTreeStore<K extends Comparable<K>,V>public NBPlusTree.IntermediateNode<K,V> root()
root in interface NBPlusTreeStore<K extends Comparable<K>,V>public NBPlusTree.LeafNode<K,V> firstLeaf()
firstLeaf in interface NBPlusTreeStore<K extends Comparable<K>,V>public void updateRoot(NBPlusTree.IntermediateNode<K,V> root)
updateRoot in interface NBPlusTreeStore<K extends Comparable<K>,V>public void updateFirstLeaf(NBPlusTree.LeafNode<K,V> node)
updateFirstLeaf in interface NBPlusTreeStore<K extends Comparable<K>,V>public NBPlusTree.LeafNode<K,V> createLeafNode(NBPlusTree.IntermediateNode<K,V> parent)
createLeafNode in interface NBPlusTreeStore<K extends Comparable<K>,V>public NBPlusTree.IntermediateNode<K,V> createInternalNode()
createInternalNode in interface NBPlusTreeStore<K extends Comparable<K>,V>public void updateParent(NBPlusTree.Node<K,V> root, NBPlusTree.IntermediateNode<K,V> parent)
updateParent in interface NBPlusTreeStore<K extends Comparable<K>,V>public void updateLeftSibling(NBPlusTree.IntermediateNode<K,V> node, NBPlusTree.IntermediateNode<K,V> value)
updateLeftSibling in interface NBPlusTreeStore<K extends Comparable<K>,V>public void updateRightSibling(NBPlusTree.IntermediateNode<K,V> node, NBPlusTree.IntermediateNode<K,V> value)
updateRightSibling in interface NBPlusTreeStore<K extends Comparable<K>,V>public void updateLeftSibling(NBPlusTree.LeafNode<K,V> node, NBPlusTree.LeafNode<K,V> value)
updateLeftSibling in interface NBPlusTreeStore<K extends Comparable<K>,V>public void updateRightSibling(NBPlusTree.LeafNode<K,V> node, NBPlusTree.LeafNode<K,V> value)
updateRightSibling in interface NBPlusTreeStore<K extends Comparable<K>,V>public void addEntry(NBPlusTree.LeafNode<K,V> node, K k, V v)
addEntry in interface NBPlusTreeStore<K extends Comparable<K>,V>public void addEntries(NBPlusTree.LeafNode<K,V> node, Map.Entry<K,V>[] orderedElements)
addEntries in interface NBPlusTreeStore<K extends Comparable<K>,V>public int findIndexOfChild(NBPlusTree.IntermediateNode<K,V> node, NBPlusTree.Node<K,V> child)
findIndexOfChild in interface NBPlusTreeStore<K extends Comparable<K>,V>public void addChild(NBPlusTree.IntermediateNode<K,V> node, NBPlusTree.Node<K,V> pointer, int index)
addChild in interface NBPlusTreeStore<K extends Comparable<K>,V>public void updateChildAt(NBPlusTree.IntermediateNode<K,V> node, int index, K key, NBPlusTree.Node<K,V> child)
updateChildAt in interface NBPlusTreeStore<K extends Comparable<K>,V>public V updateValueAt(NBPlusTree.LeafNode<K,V> node, int index, V value)
updateValueAt in interface NBPlusTreeStore<K extends Comparable<K>,V>public void removeChildAt(NBPlusTree.IntermediateNode<K,V> node, int index)
removeChildAt in interface NBPlusTreeStore<K extends Comparable<K>,V>public void removeChildAt(NBPlusTree.LeafNode<K,V> node, int index)
removeChildAt in interface NBPlusTreeStore<K extends Comparable<K>,V>public int indexOfKey(NBPlusTree.LeafNode<K,V> leafNode, K key)
indexOfKey in interface NBPlusTreeStore<K extends Comparable<K>,V>public void free(NBPlusTree.Node<K,V> node)
free in interface NBPlusTreeStore<K extends Comparable<K>,V>public void save()
save in interface NBPlusTreeStore<K extends Comparable<K>,V>public NBPlusTreeStoreFixedDiskNode<K,V> loadNode(long blockId)
public void serializeKey(K key, DataOutputStream dos) throws IOException
IOExceptionpublic K deserializeKey(DataInputStream dis) throws IOException
IOExceptionpublic void serializeValue(V value, DataOutputStream dos) throws IOException
IOExceptionpublic V deserializeValue(DataInputStream dis) throws IOException
IOExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseableclose in interface NBPlusTreeStore<K extends Comparable<K>,V>Copyright © 2026 vpc open source initiative. All rights reserved.