Top Description Fields Constructors Methods
net.sf.ehcache.hibernate.regions

public Class EhcacheEntityRegion

extends EhcacheTransactionalDataRegion
implements EntityRegion
Class Inheritance
All Implemented Interfaces
org.hibernate.cache.EntityRegion, org.hibernate.cache.TransactionalDataRegion, org.hibernate.cache.Region
Imports
java.util.Properties, net.sf.ehcache.Ehcache, net.sf.ehcache.hibernate.strategy.EhcacheAccessStrategyFactory, org.hibernate.cache.CacheDataDescription, .CacheException, .EntityRegion, org.hibernate.cache.access.AccessType, .EntityRegionAccessStrategy, org.hibernate.cfg.Settings, org.slf4j.Logger, .LoggerFactory

An entity region specific wrapper around an Ehcache instance.

This implementation returns Ehcache specific access strategy instances for all the non-transactional access types. Transactional access is not supported.

Authors
Chris Dennis, Abhishek Sanoujam

Field Summary

Modifier and TypeField and Description
private static final Logger
Inherited from net.sf.ehcache.hibernate.regions.EhcacheTransactionalDataRegion:
metadatasettings

Constructor Summary

AccessConstructor and Description
public
EhcacheEntityRegion(EhcacheAccessStrategyFactory accessStrategyFactory, Ehcache underlyingCache, Settings settings, CacheDataDescription metadata, Properties properties)

Constructs an EhcacheEntityRegion around the given underlying cache.

Method Summary

Modifier and TypeMethod and Description
public EntityRegionAccessStrategy
buildAccessStrategy(AccessType
The type of access strategy to build; never null.
accessType
)

Implements org.hibernate.cache.EntityRegion.buildAccessStrategy.

Build an access strategy for the requested access type.
Inherited from net.sf.ehcache.hibernate.regions.EhcacheTransactionalDataRegion:
cleargetgetCacheDataDescriptiongetSettingsisTransactionAwarelocksAreIndependentOfCacheputputEternalreadLockreadUnlockremovewriteLockwriteUnlock

Field Detail

LOGback to summary
private static final Logger LOG

Hides net.sf.ehcache.hibernate.regions.EhcacheDataRegion.LOG.

Constructor Detail

EhcacheEntityRegionback to summary
public EhcacheEntityRegion(EhcacheAccessStrategyFactory accessStrategyFactory, Ehcache underlyingCache, Settings settings, CacheDataDescription metadata, Properties properties)

Constructs an EhcacheEntityRegion around the given underlying cache.

Method Detail

buildAccessStrategyback to summary
public EntityRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException

Implements org.hibernate.cache.EntityRegion.buildAccessStrategy.

Doc from org.hibernate.cache.EntityRegion.buildAccessStrategy.

Build an access strategy for the requested access type.

Parameters
accessType:AccessType

The type of access strategy to build; never null.

Returns:EntityRegionAccessStrategy

The appropriate strategy contract for accessing this region for the requested type of access.

Exceptions
CacheException:
Usually indicates mis-configuration.