Package org.cache2k

Interface KeyValueStore<K,​V>

    • Method Detail

      • put

        void put​(K key,
                 V value)
        Deprecated.
        Insert or update a value associated with the given key.
        Parameters:
        key - key with which the specified value is associated
        value - value to be associated with the specified key
        See Also:
        Cache.put(Object, Object)
      • putAll

        void putAll​(Map<? extends K,​? extends V> valueMap)
        Deprecated.
        Insert or update all elements of the map into the cache.
        Parameters:
        valueMap - Map of keys with associated values to be inserted in the cache
        Throws:
        NullPointerException - if one of the specified keys is null
      • remove

        void remove​(K key)
        Deprecated.
        Remove a value from the cache that is associated with the key.

        Rationale: It is intentional that this method does not return a boolean or the previous entry. When operating in cache through configuration (which means CacheWriter CacheLoader is registered) a boolean could mean two different things: the value was present in the cache or the value was present in the system of authority. The purpose of this interface is a reduced set of methods that cannot be misinterpreted.

        Parameters:
        key - key which mapping is to be removed from the cache, not null
        See Also:
        Cache.remove(K)