Interface KeyValueStore


public interface KeyValueStore
An abstraction of a key/value persistent store of a Patricia tree.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    get(byte[] key)
    Gets the association of a key in this store.
    void
    put(byte[] key, byte[] value)
    Persists a key/value association in this store.
    void
    remove(byte[] key)
    Deletes the association for the given key, that must exist in store.
  • Method Details

    • put

      void put(byte[] key, byte[] value)
      Persists a key/value association in this store. It replaces it if it was already present.
      Parameters:
      key - the key
      value - the value
    • remove

      void remove(byte[] key) throws UnknownKeyException
      Deletes the association for the given key, that must exist in store.
      Parameters:
      key - the key
      Throws:
      UnknownKeyException - if key is not present in this key/value store
    • get

      byte[] get(byte[] key) throws UnknownKeyException
      Gets the association of a key in this store.
      Parameters:
      key - the key
      Returns:
      the value associated with the key
      Throws:
      UnknownKeyException - if key is not present in this key/value store