Interface KeyValueStore<K,​V>

    • Method Detail

      • put

        void put​(K key,
                 V value)
        Update the value associated with this key.
        Parameters:
        key - The key to associate the value to
        value - The value to update, it can be null; if the serialized bytes are also null it is interpreted as deletes
        Throws:
        NullPointerException - If null is used for key.
      • putIfAbsent

        V putIfAbsent​(K key,
                      V value)
        Update the value associated with this key, unless a value is already associated with the key.
        Parameters:
        key - The key to associate the value to
        value - The value to update, it can be null; if the serialized bytes are also null it is interpreted as deletes
        Returns:
        The old value or null if there is no such key.
        Throws:
        NullPointerException - If null is used for key.
      • putAll

        void putAll​(List<KeyValue<K,​V>> entries)
        Update all the given key/value pairs.
        Parameters:
        entries - A list of entries to put into the store; if the serialized bytes are also null it is interpreted as deletes
        Throws:
        NullPointerException - If null is used for key.
      • delete

        V delete​(K key)
        Delete the value from the store (if there is one).
        Parameters:
        key - The key
        Returns:
        The old value or null if there is no such key.
        Throws:
        NullPointerException - If null is used for key.