Package org.hibernate.testing.cache
Class MapStorageAccessImpl
- java.lang.Object
-
- org.hibernate.testing.cache.MapStorageAccessImpl
-
- All Implemented Interfaces:
DomainDataStorageAccess,StorageAccess
public class MapStorageAccessImpl extends Object implements DomainDataStorageAccess
StorageAccess impl wrapping a simple data Map (ConcurrentMap)
-
-
Constructor Summary
Constructors Constructor Description MapStorageAccessImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearCache(SharedSessionContractImplementor session)Clear data from the cachebooleancontains(Object key)Does the cache contain this key?voidevictData()Clear all data regardless of transaction/lockingvoidevictData(Object key)Remove the entry regardless of transaction/lockingObjectgetFromCache(Object key, SharedSessionContractImplementor session)Get an item from the cache.protected ConcurrentMapgetOrMakeDataMap()voidputIntoCache(Object key, Object value, SharedSessionContractImplementor session)Put an item into the cachevoidrelease()Release any resources.voidremoveFromCache(Object key, SharedSessionContractImplementor session)Remove an item from the cache by key-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.cache.spi.support.DomainDataStorageAccess
putFromLoad
-
-
-
-
Method Detail
-
contains
public boolean contains(Object key)
Description copied from interface:StorageAccessDoes the cache contain this key?- Specified by:
containsin interfaceStorageAccess
-
getFromCache
public Object getFromCache(Object key, SharedSessionContractImplementor session)
Description copied from interface:StorageAccessGet an item from the cache.- Specified by:
getFromCachein interfaceStorageAccess
-
putIntoCache
public void putIntoCache(Object key, Object value, SharedSessionContractImplementor session)
Description copied from interface:StorageAccessPut an item into the cache- Specified by:
putIntoCachein interfaceStorageAccess
-
getOrMakeDataMap
protected ConcurrentMap getOrMakeDataMap()
-
removeFromCache
public void removeFromCache(Object key, SharedSessionContractImplementor session)
Description copied from interface:StorageAccessRemove an item from the cache by key- Specified by:
removeFromCachein interfaceStorageAccess
-
clearCache
public void clearCache(SharedSessionContractImplementor session)
Description copied from interface:StorageAccessClear data from the cache- Specified by:
clearCachein interfaceStorageAccess
-
evictData
public void evictData()
Description copied from interface:StorageAccessClear all data regardless of transaction/locking- Specified by:
evictDatain interfaceStorageAccess
-
evictData
public void evictData(Object key)
Description copied from interface:StorageAccessRemove the entry regardless of transaction/locking- Specified by:
evictDatain interfaceStorageAccess
-
release
public void release()
Description copied from interface:StorageAccessRelease any resources. Called during cache shutdown- Specified by:
releasein interfaceStorageAccess
-
-