Interface SoftBPlusTree.KeyLoader<V>

Type Parameters:
V - value type
Enclosing class:
SoftBPlusTree<V>

public static interface SoftBPlusTree.KeyLoader<V>
Loads the B+ tree key for a given value during leaf node deserialization.

Keys are not stored in the serialized node format — only values are persisted. When a leaf node is deserialized, each value is read via SoftBPlusTree.ValueSerializer.read(ByteBuffer) and then passed to this loader to reconstruct the corresponding key. The returned key bytes are used for B+ tree lookups and comparisons.

This callback is invoked once per value each time a leaf node is loaded from disk (i.e., when a SoftBPlusTree.SoftNode's soft reference has been cleared and the node must be re-read).

  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    loadKey(V value)
    Returns the key bytes for the given value, or null if the key cannot be loaded (e.g., the backing data file has been deleted).
  • Method Details

    • loadKey

      byte[] loadKey(V value) throws IOException
      Returns the key bytes for the given value, or null if the key cannot be loaded (e.g., the backing data file has been deleted).
      Throws:
      IOException