org.hibernate.cache.ehcache.internal.regions
Class EhcacheEntityRegion

java.lang.Object
  extended by org.hibernate.cache.ehcache.internal.regions.EhcacheDataRegion
      extended by org.hibernate.cache.ehcache.internal.regions.EhcacheTransactionalDataRegion
          extended by org.hibernate.cache.ehcache.internal.regions.EhcacheEntityRegion
All Implemented Interfaces:
EntityRegion, Region, TransactionalDataRegion

public class EhcacheEntityRegion
extends EhcacheTransactionalDataRegion
implements EntityRegion

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.


Field Summary
 
Fields inherited from class org.hibernate.cache.ehcache.internal.regions.EhcacheTransactionalDataRegion
metadata, settings
 
Fields inherited from class org.hibernate.cache.ehcache.internal.regions.EhcacheDataRegion
accessStrategyFactory, cache
 
Constructor Summary
EhcacheEntityRegion(EhcacheAccessStrategyFactory accessStrategyFactory, net.sf.ehcache.Ehcache underlyingCache, Settings settings, CacheDataDescription metadata, Properties properties)
          Constructs an EhcacheEntityRegion around the given underlying cache.
 
Method Summary
 EntityRegionAccessStrategy buildAccessStrategy(AccessType accessType)
          Build an access strategy for the requested access type.
 
Methods inherited from class org.hibernate.cache.ehcache.internal.regions.EhcacheTransactionalDataRegion
clear, get, getCacheDataDescription, getSettings, isTransactionAware, locksAreIndependentOfCache, put, readLock, readUnlock, remove, writeLock, writeUnlock
 
Methods inherited from class org.hibernate.cache.ehcache.internal.regions.EhcacheDataRegion
contains, destroy, getEhcache, getElementCountInMemory, getElementCountOnDisk, getName, getSizeInMemory, getTimeout, nextTimestamp, toMap
 
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.TransactionalDataRegion
getCacheDataDescription, isTransactionAware
 
Methods inherited from interface org.hibernate.cache.spi.Region
contains, destroy, getElementCountInMemory, getElementCountOnDisk, getName, getSizeInMemory, getTimeout, nextTimestamp, toMap
 

Constructor Detail

EhcacheEntityRegion

public EhcacheEntityRegion(EhcacheAccessStrategyFactory accessStrategyFactory,
                           net.sf.ehcache.Ehcache underlyingCache,
                           Settings settings,
                           CacheDataDescription metadata,
                           Properties properties)
Constructs an EhcacheEntityRegion around the given underlying cache.

Parameters:
accessStrategyFactory -
Method Detail

buildAccessStrategy

public EntityRegionAccessStrategy buildAccessStrategy(AccessType accessType)
                                               throws CacheException
Build an access strategy for the requested access type.

Specified by:
buildAccessStrategy in interface EntityRegion
Parameters:
accessType - The type of access strategy to build; never null.
Returns:
The appropriate strategy contract for accessing this region for the requested type of access.
Throws:
CacheException - Usually indicates mis-configuration.


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.