Package org.hibernate.cache.spi.support
Interface StorageAccess
-
- All Known Subinterfaces:
DomainDataStorageAccess
- All Known Implementing Classes:
MapStorageAccessImpl
public interface StorageAccessA general read/write abstraction over the specific "cache" object from the caching provider.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclearCache(SharedSessionContractImplementor session)Clear data from the cachebooleancontains(java.lang.Object key)Does the cache contain this key?voidevictData()Clear all data regardless of transaction/lockingvoidevictData(java.lang.Object key)Remove the entry regardless of transaction/lockingjava.lang.ObjectgetFromCache(java.lang.Object key, SharedSessionContractImplementor session)Get an item from the cache.voidputIntoCache(java.lang.Object key, java.lang.Object value, SharedSessionContractImplementor session)Put an item into the cachevoidrelease()Release any resources.default voidremoveFromCache(java.lang.Object key, SharedSessionContractImplementor session)Remove an item from the cache by key
-
-
-
Method Detail
-
getFromCache
java.lang.Object getFromCache(java.lang.Object key, SharedSessionContractImplementor session)Get an item from the cache.
-
putIntoCache
void putIntoCache(java.lang.Object key, java.lang.Object value, SharedSessionContractImplementor session)Put an item into the cache
-
removeFromCache
default void removeFromCache(java.lang.Object key, SharedSessionContractImplementor session)Remove an item from the cache by key
-
clearCache
default void clearCache(SharedSessionContractImplementor session)
Clear data from the cache
-
contains
boolean contains(java.lang.Object key)
Does the cache contain this key?
-
evictData
void evictData()
Clear all data regardless of transaction/locking
-
evictData
void evictData(java.lang.Object key)
Remove the entry regardless of transaction/locking
-
release
void release()
Release any resources. Called during cache shutdown
-
-