Package org.ehcache.spi.persistence
Interface StateHolder<K,V>
-
- Type Parameters:
K- type of KeysV- type of Values
public interface StateHolder<K,V>AMaplike structure that can hold key value mappings.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Set<java.util.Map.Entry<K,V>>entrySet()Retrieves all the entries in theStateHolderas aSetofMap.Entryinstances.Vget(K key)Retrieves the value mapped to the givenkeyVputIfAbsent(K key, V value)If the specified key is not already associated with a value (or is mapped tonull) associates it with the given value and returnsnull, else returns the current value.
-
-
-
Method Detail
-
putIfAbsent
V putIfAbsent(K key, V value)
If the specified key is not already associated with a value (or is mapped tonull) associates it with the given value and returnsnull, else returns the current value.- Parameters:
key- a keyvalue- a value- Returns:
- the previous value associated with the specified key, or
nullif there was no mapping for the key.
-
get
V get(K key)
Retrieves the value mapped to the givenkey- Parameters:
key- a key- Returns:
- the value mapped to the key
-
-