Package org.ehcache.spi.persistence
Interface StateRepository
-
public interface StateRepositoryA repository allowing to preserve state in the context of aCache.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default <K extends Serializable,V extends Serializable>
StateHolder<K,V>getPersistentStateHolder(String name, Class<K> keyClass, Class<V> valueClass)Deprecated.Replaced bygetPersistentStateHolder(String, Class, Class, Predicate, ClassLoader)that takes in a Predicate that authorizes a class for deserialization<K extends Serializable,V extends Serializable>
StateHolder<K,V>getPersistentStateHolder(String name, Class<K> keyClass, Class<V> valueClass, Predicate<Class<?>> isClassPermitted, ClassLoader classLoader)Gets a named state holder rooted in the currentStateRepository.
-
-
-
Method Detail
-
getPersistentStateHolder
@Deprecated default <K extends Serializable,V extends Serializable> StateHolder<K,V> getPersistentStateHolder(String name, Class<K> keyClass, Class<V> valueClass)
Deprecated.Replaced bygetPersistentStateHolder(String, Class, Class, Predicate, ClassLoader)that takes in a Predicate that authorizes a class for deserializationGets a named state holder rooted in the currentStateRepository.If the state holder existed already, it is returned with its content fully available.
- Type Parameters:
K- the key type, must beSerializableV- the value type, must beSerializable- Parameters:
name- the state holder namekeyClass- concrete key typevalueClass- concrete value type- Returns:
- a state holder
-
getPersistentStateHolder
<K extends Serializable,V extends Serializable> StateHolder<K,V> getPersistentStateHolder(String name, Class<K> keyClass, Class<V> valueClass, Predicate<Class<?>> isClassPermitted, ClassLoader classLoader)
Gets a named state holder rooted in the currentStateRepository.If the state holder existed already, it is returned with its content fully available.
- Type Parameters:
K- the key type, must beSerializableV- the value type, must beSerializable- Parameters:
name- the state holder namekeyClass- concrete key typevalueClass- concrete value typeisClassPermitted- Predicate that determines whether a class is authorized for deserialization as part of key or value deserializationclassLoader- class loader used at the time of deserialization of key and value- Returns:
- a state holder
-
-