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(java.lang.String name, RegionFactory regionFactory, StorageAccess storageAccess)Constructs aDirectAccessRegionTemplate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clear all data cached in the regionvoiddestroy()The "end state" contract of the region's lifecycle.java.lang.ObjectgetFromCache(java.lang.Object key, SharedSessionContractImplementor session)Get value by keyStorageAccessgetStorageAccess()voidputIntoCache(java.lang.Object key, java.lang.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(java.lang.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 java.lang.Object getFromCache(java.lang.Object key, SharedSessionContractImplementor session)Description copied from interface:DirectAccessRegionGet value by key- Specified by:
getFromCachein interfaceDirectAccessRegion
-
putIntoCache
public void putIntoCache(java.lang.Object key, java.lang.Object value, SharedSessionContractImplementor session)Description copied from interface:DirectAccessRegionPut a value by key- Specified by:
putIntoCachein interfaceDirectAccessRegion
-
clear
public void clear()
Description copied from interface:RegionClear all data cached in the region
-
destroy
public void destroy()
Description copied from interface:RegionThe "end state" contract of the region's lifecycle. Called duringSessionFactory.close()to give the region a chance to cleanup.
-
-