org.ehcache.spi.persistence
Interface StateRepository


public interface StateRepository

A repository allowing to preserve state in the context of a Cache.


Method Summary
<K extends java.io.Serializable,V extends java.io.Serializable>
java.util.concurrent.ConcurrentMap<K,V>
getPersistentConcurrentMap(java.lang.String name, java.lang.Class<K> keyClass, java.lang.Class<V> valueClass)
          Gets a named persistent map rooted in the current StateRepository.
 

Method Detail

getPersistentConcurrentMap

<K extends java.io.Serializable,V extends java.io.Serializable> java.util.concurrent.ConcurrentMap<K,V> getPersistentConcurrentMap(java.lang.String name,
                                                                                                                                   java.lang.Class<K> keyClass,
                                                                                                                                   java.lang.Class<V> valueClass)
Gets a named persistent map rooted in the current StateRepository.

If the map existed already, it is returned with its content fully available.

Type Parameters:
K - the map key type, must be Serializable
V - the map value type, must be Serializable
Parameters:
name - the map name
keyClass - concrete map key type
valueClass - concrete map value type
Returns:
a map