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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
clearCache(SharedSessionContractImplementor session)
Clear data from the cacheboolean
contains(Object key)
Does the cache contain this key?void
evictData()
Clear all data regardless of transaction/lockingvoid
evictData(Object key)
Remove the entry regardless of transaction/lockingObject
getFromCache(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 Detail
-
getFromCache
Object getFromCache(Object key, SharedSessionContractImplementor session)
Get an item from the cache.
-
putIntoCache
void putIntoCache(Object key, Object value, SharedSessionContractImplementor session)
Put an item into the cache
-
removeFromCache
default void removeFromCache(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(Object key)
Does the cache contain this key?
-
evictData
void evictData()
Clear all data regardless of transaction/locking
-
evictData
void evictData(Object key)
Remove the entry regardless of transaction/locking
-
release
void release()
Release any resources. Called during cache shutdown
-
-