Package org.cache2k
Interface KeyValueStore<K,V>
-
- All Superinterfaces:
AdvancedKeyValueSource<K,V>
,DataAware<K,V>
,KeyValueSource<K,V>
- All Known Subinterfaces:
Cache<K,V>
- All Known Implementing Classes:
AbstractCache
,ForwardingCache
@Deprecated public interface KeyValueStore<K,V> extends AdvancedKeyValueSource<K,V>
Deprecated.Reduced interface for read/write data access.This interface contains no methods that expose or mutate the cache state. This is intended as a reduced interface that has transparent semantics in cache through operation.
- Author:
- Jens Wilke
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
put(K key, V value)
Deprecated.Insert or update a value associated with the given key.void
putAll(Map<? extends K,? extends V> valueMap)
Deprecated.Insert or update all elements of the map into the cache.void
remove(K key)
Deprecated.Remove a value from the cache that is associated with the key.void
removeAll(Iterable<? extends K> keys)
Deprecated.Remove mappings from the cache.-
Methods inherited from interface org.cache2k.AdvancedKeyValueSource
getAll
-
Methods inherited from interface org.cache2k.KeyValueSource
get
-
-
-
-
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 associatedvalue
- 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)
-
removeAll
void removeAll(Iterable<? extends K> keys)
Deprecated.Remove mappings from the cache.- Parameters:
keys
- keys is to be removed from the cache- See Also:
Cache.removeAll(java.lang.Iterable<? extends K>)
-
-