Package org.hibernate.testing.cache
Class MapStorageAccessImpl
- java.lang.Object
-
- org.hibernate.testing.cache.MapStorageAccessImpl
-
- All Implemented Interfaces:
DomainDataStorageAccess,StorageAccess
public class MapStorageAccessImpl extends java.lang.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(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.protected java.util.concurrent.ConcurrentMapgetOrMakeDataMap()voidputIntoCache(java.lang.Object key, java.lang.Object value, SharedSessionContractImplementor session)Put an item into the cachevoidrelease()Release any resources.voidremoveFromCache(java.lang.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(java.lang.Object key)
Description copied from interface:StorageAccessDoes the cache contain this key?- Specified by:
containsin interfaceStorageAccess
-
getFromCache
public java.lang.Object getFromCache(java.lang.Object key, SharedSessionContractImplementor session)Description copied from interface:StorageAccessGet an item from the cache.- Specified by:
getFromCachein interfaceStorageAccess
-
putIntoCache
public void putIntoCache(java.lang.Object key, java.lang.Object value, SharedSessionContractImplementor session)Description copied from interface:StorageAccessPut an item into the cache- Specified by:
putIntoCachein interfaceStorageAccess
-
getOrMakeDataMap
protected java.util.concurrent.ConcurrentMap getOrMakeDataMap()
-
removeFromCache
public void removeFromCache(java.lang.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(java.lang.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
-
-