Package org.hibernate.cache.spi.support
Interface StorageAccess
- All Known Subinterfaces:
DomainDataStorageAccess
- All Known Implementing Classes:
JCacheAccessImpl
,MapStorageAccessImpl
public interface StorageAccess
A general read/write abstraction over the specific "cache" object from the caching provider.
- API Note:
- Similar to
CachedDomainDataAccess
, some methods handle "transactional" access (access in the scope of a session), and some are non-"transactional" (for cache management outside a session).
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Clear data from the cacheboolean
Does the cache contain this key?void
Clear all data regardless of transaction/lockingvoid
Remove the entry regardless of transaction/lockinggetFromCache
(Object key, SharedSessionContractImplementor session) Get an item from the cache.void
putIntoCache
(Object key, Object value, SharedSessionContractImplementor session) Put an item into the cachevoid
release()
Release any resources.default void
removeFromCache
(Object key, SharedSessionContractImplementor session) Remove an item from the cache by key
-
Method Details
-
contains
Does the cache contain this key? -
evictData
void evictData()Clear all data regardless of transaction/locking -
evictData
Remove the entry regardless of transaction/locking -
release
void release()Release any resources. Called during cache shutdown