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

pack-priv abstract Class EhcacheGeneralDataRegion

extends EhcacheDataRegion
implements GeneralDataRegion
Class Inheritance
All Implemented Interfaces
org.hibernate.cache.GeneralDataRegion, org.hibernate.cache.Region
Known Direct Subclasses
net.sf.ehcache.hibernate.regions.EhcacheQueryResultsRegion, net.sf.ehcache.hibernate.regions.EhcacheTimestampsRegion
Imports
java.util.Properties, net.sf.ehcache.Ehcache, .Element, net.sf.ehcache.constructs.nonstop.NonStopCacheException, net.sf.ehcache.hibernate.nonstop.HibernateNonstopCacheExceptionHandler, net.sf.ehcache.hibernate.strategy.EhcacheAccessStrategyFactory, org.hibernate.cache.CacheException, .GeneralDataRegion, org.slf4j.Logger, .LoggerFactory

An Ehcache specific GeneralDataRegion.

GeneralDataRegion instances are used for both the timestamps and query caches.

Authors
Chris Dennis, Greg Luck, Emmanuel Bernard, Abhishek Sanoujam

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
EhcacheGeneralDataRegion(EhcacheAccessStrategyFactory accessStrategyFactory, Ehcache cache, Properties properties)

Creates an EhcacheGeneralDataRegion using the given Ehcache instance as a backing.

Method Summary

Modifier and TypeMethod and Description
public void
evict(Object
The key of the item to remove
key
)

Implements org.hibernate.cache.GeneralDataRegion.evict.

Evict an item from the cache immediately (without regard for transaction isolation).
public void
evictAll()

Implements org.hibernate.cache.GeneralDataRegion.evictAll.

Evict all contents of this particular cache region (without regard for transaction isolation).
public Object
get(Object
The key of the item to be retrieved.
key
)

Implements org.hibernate.cache.GeneralDataRegion.get.

Get an item from the cache.
public void
put(Object
The key under which to cache the item.
key
,
Object
The item to cache.
value
)

Implements org.hibernate.cache.GeneralDataRegion.put.

Put an item into the cache.
Inherited from net.sf.ehcache.hibernate.regions.EhcacheDataRegion:
containsdestroygetEhcachegetElementCountInMemorygetElementCountOnDiskgetNamegetSizeInMemorygetTimeoutnextTimestamptoMap

Field Detail

LOGback to summary
private static final Logger LOG

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

Constructor Detail

EhcacheGeneralDataRegionback to summary
public EhcacheGeneralDataRegion(EhcacheAccessStrategyFactory accessStrategyFactory, Ehcache cache, Properties properties)

Creates an EhcacheGeneralDataRegion using the given Ehcache instance as a backing.

Method Detail

evictback to summary
public void evict(Object key) throws CacheException

Implements org.hibernate.cache.GeneralDataRegion.evict.

Doc from org.hibernate.cache.GeneralDataRegion.evict.

Evict an item from the cache immediately (without regard for transaction isolation).

Parameters
key:Object

The key of the item to remove

Exceptions
CacheException:
Indicates a problem accessing the item or region.
evictAllback to summary
public void evictAll() throws CacheException

Implements org.hibernate.cache.GeneralDataRegion.evictAll.

Doc from org.hibernate.cache.GeneralDataRegion.evictAll.

Evict all contents of this particular cache region (without regard for transaction isolation).

Exceptions
CacheException:
Indicates problem accessing the region.
getback to summary
public Object get(Object key) throws CacheException

Implements org.hibernate.cache.GeneralDataRegion.get.

Doc from org.hibernate.cache.GeneralDataRegion.get.

Get an item from the cache.

Parameters
key:Object

The key of the item to be retrieved.

Returns:Object

the cached object or null

Exceptions
CacheException:
Indicates a problem accessing the item or region.
putback to summary
public void put(Object key, Object value) throws CacheException

Implements org.hibernate.cache.GeneralDataRegion.put.

Doc from org.hibernate.cache.GeneralDataRegion.put.

Put an item into the cache.

Parameters
key:Object

The key under which to cache the item.

value:Object

The item to cache.

Exceptions
CacheException:
Indicates a problem accessing the region.