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

pack-priv abstract Class AbstractEhcacheAccessStrategy<T extends net.sf.ehcache.hibernate.regions.EhcacheTransactionalDataRegion>

extends Object
Class Inheritance
Known Direct Subclasses
net.sf.ehcache.hibernate.strategy.AbstractReadWriteEhcacheAccessStrategy, net.sf.ehcache.hibernate.strategy.NonStrictReadWriteEhcacheCollectionRegionAccessStrategy, net.sf.ehcache.hibernate.strategy.NonStrictReadWriteEhcacheEntityRegionAccessStrategy, net.sf.ehcache.hibernate.strategy.ReadOnlyEhcacheCollectionRegionAccessStrategy, net.sf.ehcache.hibernate.strategy.ReadOnlyEhcacheEntityRegionAccessStrategy, net.sf.ehcache.hibernate.strategy.TransactionalEhcacheCollectionRegionAccessStrategy, net.sf.ehcache.hibernate.strategy.TransactionalEhcacheEntityRegionAccessStrategy
Type Parameters
<T>
type of the enclosed region
Imports
net.sf.ehcache.hibernate.regions.EhcacheTransactionalDataRegion, org.hibernate.cache.CacheException, org.hibernate.cache.access.SoftLock, org.hibernate.cfg.Settings

Ultimate superclass for all Ehcache specific Hibernate AccessStrategy implementations.
Author
Chris Dennis

Field Summary

Modifier and TypeField and Description
protected final T
region

The wrapped Hibernate cache region.

protected final Settings
settings

The settings for this persistence unit.

Constructor Summary

AccessConstructor and Description
pack-priv
AbstractEhcacheAccessStrategy(T region, Settings settings)

Create an access strategy wrapping the given region.

Method Summary

Modifier and TypeMethod and Description
public final void
evict(Object key)

Remove the given mapping without regard to transactional safety

public final void
evictAll()

Remove all mappings without regard to transactional safety

public final SoftLock

Returns:

null
lockRegion
()

Region locks are not supported.

public final boolean
putFromLoad(Object key, Object value, long txTimestamp, Object version)

This method is a placeholder for method signatures supplied by interfaces pulled in further down the class hierarchy.

public abstract boolean
putFromLoad(Object key, Object value, long txTimestamp, Object version, boolean minimalPutOverride)

This method is a placeholder for method signatures supplied by interfaces pulled in further down the class hierarchy.

public void
remove(Object key)

A no-op since this is an asynchronous cache access strategy.

public final void
removeAll()

Called to evict data from the entire region

public final void
unlockRegion(SoftLock lock)

Region locks are not supported - perform a cache clear as a precaution.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

regionback to summary
protected final T region

The wrapped Hibernate cache region.

settingsback to summary
protected final Settings settings

The settings for this persistence unit.

Constructor Detail

AbstractEhcacheAccessStrategyback to summary
pack-priv AbstractEhcacheAccessStrategy(T region, Settings settings)

Create an access strategy wrapping the given region.

Method Detail

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

Remove the given mapping without regard to transactional safety

See Also
org.hibernate.cache.access.EntityRegionAccessStrategy#evict(java.lang.Object), org.hibernate.cache.access.CollectionRegionAccessStrategy#evict(java.lang.Object)
evictAllback to summary
public final void evictAll() throws CacheException

Remove all mappings without regard to transactional safety

See Also
org.hibernate.cache.access.EntityRegionAccessStrategy#evictAll(), org.hibernate.cache.access.CollectionRegionAccessStrategy#evictAll()
lockRegionback to summary
public final SoftLock lockRegion()

Region locks are not supported.

Returns:SoftLock

null

See Also
org.hibernate.cache.access.EntityRegionAccessStrategy#lockRegion(), org.hibernate.cache.access.CollectionRegionAccessStrategy#lockRegion()
putFromLoadback to summary
public final boolean putFromLoad(Object key, Object value, long txTimestamp, Object version) throws CacheException

This method is a placeholder for method signatures supplied by interfaces pulled in further down the class hierarchy.

See Also
org.hibernate.cache.access.EntityRegionAccessStrategy#putFromLoad(java.lang.Object, java.lang.Object, long, java.lang.Object), org.hibernate.cache.access.CollectionRegionAccessStrategy#putFromLoad(java.lang.Object, java.lang.Object, long, java.lang.Object)
putFromLoadback to summary
public abstract boolean putFromLoad(Object key, Object value, long txTimestamp, Object version, boolean minimalPutOverride) throws CacheException

This method is a placeholder for method signatures supplied by interfaces pulled in further down the class hierarchy.

See Also
org.hibernate.cache.access.EntityRegionAccessStrategy#putFromLoad(java.lang.Object, java.lang.Object, long, java.lang.Object, boolean), org.hibernate.cache.access.CollectionRegionAccessStrategy#putFromLoad(java.lang.Object, java.lang.Object, long, java.lang.Object, boolean)
removeback to summary
public void remove(Object key) throws CacheException

A no-op since this is an asynchronous cache access strategy.

See Also
org.hibernate.cache.access.EntityRegionAccessStrategy#remove(java.lang.Object), org.hibernate.cache.access.CollectionRegionAccessStrategy#remove(java.lang.Object)
removeAllback to summary
public final void removeAll() throws CacheException

Called to evict data from the entire region

Exceptions
CacheException:
Propogated from underlying org.hibernate.cache.Region
See Also
org.hibernate.cache.access.EntityRegionAccessStrategy#removeAll(), org.hibernate.cache.access.CollectionRegionAccessStrategy#removeAll()
unlockRegionback to summary
public final void unlockRegion(SoftLock lock) throws CacheException

Region locks are not supported - perform a cache clear as a precaution.

See Also
org.hibernate.cache.access.EntityRegionAccessStrategy#unlockRegion(org.hibernate.cache.access.SoftLock), org.hibernate.cache.access.CollectionRegionAccessStrategy#unlockRegion(org.hibernate.cache.access.SoftLock)