Package org.hibernate.cache.spi.support
Class DirectAccessRegionTemplate
- java.lang.Object
-
- org.hibernate.cache.spi.support.AbstractRegion
-
- org.hibernate.cache.spi.support.DirectAccessRegionTemplate
-
- All Implemented Interfaces:
DirectAccessRegion
,Region
- Direct Known Subclasses:
QueryResultsRegionTemplate
,TimestampsRegionTemplate
public abstract class DirectAccessRegionTemplate extends AbstractRegion implements DirectAccessRegion
Bridge between DirectAccessRegion and StorageAccess
-
-
Constructor Summary
Constructors Constructor Description DirectAccessRegionTemplate(String name, RegionFactory regionFactory, StorageAccess storageAccess)
Constructs aDirectAccessRegionTemplate
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear all data cached in the regionvoid
destroy()
The "end state" contract of the region's lifecycle.Object
getFromCache(Object key, SharedSessionContractImplementor session)
Get value by keyStorageAccess
getStorageAccess()
void
putIntoCache(Object key, Object value, SharedSessionContractImplementor session)
Put a value by key-
Methods inherited from class org.hibernate.cache.spi.support.AbstractRegion
getName, getRegionFactory
-
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.Region
getName, getRegionFactory
-
-
-
-
Constructor Detail
-
DirectAccessRegionTemplate
public DirectAccessRegionTemplate(String name, RegionFactory regionFactory, StorageAccess storageAccess)
Constructs aDirectAccessRegionTemplate
.- Parameters:
name
- - the unqualified region nameregionFactory
- - the region factorystorageAccess
- - the cache storage access strategy
-
-
Method Detail
-
getStorageAccess
public StorageAccess getStorageAccess()
-
getFromCache
public Object getFromCache(Object key, SharedSessionContractImplementor session)
Description copied from interface:DirectAccessRegion
Get value by key- Specified by:
getFromCache
in interfaceDirectAccessRegion
-
putIntoCache
public void putIntoCache(Object key, Object value, SharedSessionContractImplementor session)
Description copied from interface:DirectAccessRegion
Put a value by key- Specified by:
putIntoCache
in interfaceDirectAccessRegion
-
clear
public void clear()
Description copied from interface:Region
Clear all data cached in the region
-
destroy
public void destroy()
Description copied from interface:Region
The "end state" contract of the region's lifecycle. Called duringSessionFactory.close()
to give the region a chance to cleanup.
-
-