ehcache

net.sf.ehcache.hibernate.nonstop
Class NonstopAwareCollectionRegionAccessStrategy

java.lang.Object
  extended by net.sf.ehcache.hibernate.nonstop.NonstopAwareCollectionRegionAccessStrategy

public class NonstopAwareCollectionRegionAccessStrategy
extends Object

Implementation of CollectionRegionAccessStrategy that handles NonStopCacheException using HibernateNonstopCacheExceptionHandler

Author:
Abhishek Sanoujam

Constructor Summary
NonstopAwareCollectionRegionAccessStrategy(CollectionRegionAccessStrategy actualStrategy, HibernateNonstopCacheExceptionHandler hibernateNonstopExceptionHandler)
          Constructor accepting the actual CollectionRegionAccessStrategy and the HibernateNonstopCacheExceptionHandler
 
Method Summary
 void evict(Object key)
          
 void evictAll()
          
 Object get(Object key, long txTimestamp)
          
 CollectionRegion getRegion()
          
 SoftLock lockItem(Object key, Object version)
          
 SoftLock lockRegion()
          
 boolean putFromLoad(Object key, Object value, long txTimestamp, Object version)
          
 boolean putFromLoad(Object key, Object value, long txTimestamp, Object version, boolean minimalPutOverride)
          
 void remove(Object key)
          
 void removeAll()
          
 void unlockItem(Object key, SoftLock lock)
          
 void unlockRegion(SoftLock lock)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NonstopAwareCollectionRegionAccessStrategy

public NonstopAwareCollectionRegionAccessStrategy(CollectionRegionAccessStrategy actualStrategy,
                                                  HibernateNonstopCacheExceptionHandler hibernateNonstopExceptionHandler)
Constructor accepting the actual CollectionRegionAccessStrategy and the HibernateNonstopCacheExceptionHandler

Parameters:
actualStrategy -
hibernateNonstopExceptionHandler -
Method Detail

getRegion

public CollectionRegion getRegion()

See Also:
org.hibernate.cache.access.EntityRegionAccessStrategy#getRegion()

evict

public void evict(Object key)
           throws CacheException

Throws:
CacheException
See Also:
org.hibernate.cache.access.EntityRegionAccessStrategy#evict(java.lang.Object)

evictAll

public void evictAll()
              throws CacheException

Throws:
CacheException
See Also:
org.hibernate.cache.access.EntityRegionAccessStrategy#evictAll()

get

public Object get(Object key,
                  long txTimestamp)
           throws CacheException

Throws:
CacheException
See Also:
org.hibernate.cache.access.EntityRegionAccessStrategy#get(java.lang.Object, long)

lockItem

public SoftLock lockItem(Object key,
                         Object version)
                  throws CacheException

Throws:
CacheException
See Also:
org.hibernate.cache.access.EntityRegionAccessStrategy#lockItem(java.lang.Object, java.lang.Object)

lockRegion

public SoftLock lockRegion()
                    throws CacheException

Throws:
CacheException
See Also:
org.hibernate.cache.access.EntityRegionAccessStrategy#lockRegion()

putFromLoad

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

Throws:
CacheException
See Also:
org.hibernate.cache.access.EntityRegionAccessStrategy#putFromLoad(java.lang.Object, java.lang.Object, long, java.lang.Object, boolean)

putFromLoad

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

Throws:
CacheException
See Also:
org.hibernate.cache.access.EntityRegionAccessStrategy#putFromLoad(java.lang.Object, java.lang.Object, long, java.lang.Object)

remove

public void remove(Object key)
            throws CacheException

Throws:
CacheException
See Also:
org.hibernate.cache.access.EntityRegionAccessStrategy#remove(java.lang.Object)

removeAll

public void removeAll()
               throws CacheException

Throws:
CacheException
See Also:
org.hibernate.cache.access.EntityRegionAccessStrategy#removeAll()

unlockItem

public void unlockItem(Object key,
                       SoftLock lock)
                throws CacheException

Throws:
CacheException
See Also:
org.hibernate.cache.access.EntityRegionAccessStrategy#unlockItem(java.lang.Object, org.hibernate.cache.access.SoftLock)

unlockRegion

public void unlockRegion(SoftLock lock)
                  throws CacheException

Throws:
CacheException
See Also:
org.hibernate.cache.access.EntityRegionAccessStrategy#unlockRegion(org.hibernate.cache.access.SoftLock)

ehcache

Copyright 2001-2015, Terracotta, Inc.