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

public Class EhcacheCollectionRegion

extends EhcacheTransactionalDataRegion
implements CollectionRegion
Class Inheritance
All Implemented Interfaces
org.hibernate.cache.CollectionRegion, 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, .CollectionRegion, org.hibernate.cache.access.AccessType, .CollectionRegionAccessStrategy, org.hibernate.cfg.Settings, org.slf4j.Logger, .LoggerFactory

A collection 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
EhcacheCollectionRegion(EhcacheAccessStrategyFactory accessStrategyFactory, Ehcache underlyingCache, Settings settings, CacheDataDescription metadata, Properties properties)

Constructs an EhcacheCollectionRegion around the given underlying cache.

Method Summary

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

Implements org.hibernate.cache.CollectionRegion.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

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

Constructs an EhcacheCollectionRegion around the given underlying cache.

Method Detail

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

Implements org.hibernate.cache.CollectionRegion.buildAccessStrategy.

Doc from org.hibernate.cache.CollectionRegion.buildAccessStrategy.

Build an access strategy for the requested access type.

Parameters
accessType:AccessType

The type of access strategy to build; never null.

Returns:CollectionRegionAccessStrategy

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

Exceptions
CacheException:
Usually indicates mis-configuration.