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

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.EhcacheNaturalIdRegion
All Implemented Interfaces:
NaturalIdRegion, Region, TransactionalDataRegion

public class EhcacheNaturalIdRegion
extends EhcacheTransactionalDataRegion
implements NaturalIdRegion

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.


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
EhcacheNaturalIdRegion(EhcacheAccessStrategyFactory accessStrategyFactory, net.sf.ehcache.Ehcache underlyingCache, Settings settings, CacheDataDescription metadata, Properties properties)
          Constructs an EhcacheNaturalIdRegion around the given underlying cache.
 
Method Summary
 NaturalIdRegionAccessStrategy 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

EhcacheNaturalIdRegion

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

Parameters:
accessStrategyFactory -
Method Detail

buildAccessStrategy

public NaturalIdRegionAccessStrategy buildAccessStrategy(AccessType accessType)
                                                  throws CacheException
Description copied from interface: NaturalIdRegion
Build an access strategy for the requested access type.

Specified by:
buildAccessStrategy in interface NaturalIdRegion
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-2013 Red Hat, Inc. All Rights Reserved.