Class NonstopAwareCollectionRegionAccessStrategy

  • All Implemented Interfaces:
    org.hibernate.cache.access.CollectionRegionAccessStrategy

    public class NonstopAwareCollectionRegionAccessStrategy
    extends java.lang.Object
    implements org.hibernate.cache.access.CollectionRegionAccessStrategy
    Implementation of CollectionRegionAccessStrategy that handles NonStopCacheException using HibernateNonstopCacheExceptionHandler
    Author:
    Abhishek Sanoujam
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void evict​(java.lang.Object key)
      void evictAll()
      java.lang.Object get​(java.lang.Object key, long txTimestamp)
      org.hibernate.cache.CollectionRegion getRegion()
      org.hibernate.cache.access.SoftLock lockItem​(java.lang.Object key, java.lang.Object version)
      org.hibernate.cache.access.SoftLock lockRegion()
      boolean putFromLoad​(java.lang.Object key, java.lang.Object value, long txTimestamp, java.lang.Object version)
      boolean putFromLoad​(java.lang.Object key, java.lang.Object value, long txTimestamp, java.lang.Object version, boolean minimalPutOverride)
      void remove​(java.lang.Object key)
      void removeAll()
      void unlockItem​(java.lang.Object key, org.hibernate.cache.access.SoftLock lock)
      void unlockRegion​(org.hibernate.cache.access.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​(org.hibernate.cache.access.CollectionRegionAccessStrategy actualStrategy,
                                                          HibernateNonstopCacheExceptionHandler hibernateNonstopExceptionHandler)
        Constructor accepting the actual CollectionRegionAccessStrategy and the HibernateNonstopCacheExceptionHandler
        Parameters:
        actualStrategy -
        hibernateNonstopExceptionHandler -
    • Method Detail

      • getRegion

        public org.hibernate.cache.CollectionRegion getRegion()
        Specified by:
        getRegion in interface org.hibernate.cache.access.CollectionRegionAccessStrategy
        See Also:
        EntityRegionAccessStrategy.getRegion()
      • evict

        public void evict​(java.lang.Object key)
                   throws org.hibernate.cache.CacheException
        Specified by:
        evict in interface org.hibernate.cache.access.CollectionRegionAccessStrategy
        Throws:
        org.hibernate.cache.CacheException
        See Also:
        EntityRegionAccessStrategy.evict(java.lang.Object)
      • evictAll

        public void evictAll()
                      throws org.hibernate.cache.CacheException
        Specified by:
        evictAll in interface org.hibernate.cache.access.CollectionRegionAccessStrategy
        Throws:
        org.hibernate.cache.CacheException
        See Also:
        EntityRegionAccessStrategy.evictAll()
      • get

        public java.lang.Object get​(java.lang.Object key,
                                    long txTimestamp)
                             throws org.hibernate.cache.CacheException
        Specified by:
        get in interface org.hibernate.cache.access.CollectionRegionAccessStrategy
        Throws:
        org.hibernate.cache.CacheException
        See Also:
        EntityRegionAccessStrategy.get(java.lang.Object, long)
      • lockItem

        public org.hibernate.cache.access.SoftLock lockItem​(java.lang.Object key,
                                                            java.lang.Object version)
                                                     throws org.hibernate.cache.CacheException
        Specified by:
        lockItem in interface org.hibernate.cache.access.CollectionRegionAccessStrategy
        Throws:
        org.hibernate.cache.CacheException
        See Also:
        EntityRegionAccessStrategy.lockItem(java.lang.Object, java.lang.Object)
      • lockRegion

        public org.hibernate.cache.access.SoftLock lockRegion()
                                                       throws org.hibernate.cache.CacheException
        Specified by:
        lockRegion in interface org.hibernate.cache.access.CollectionRegionAccessStrategy
        Throws:
        org.hibernate.cache.CacheException
        See Also:
        EntityRegionAccessStrategy.lockRegion()
      • putFromLoad

        public boolean putFromLoad​(java.lang.Object key,
                                   java.lang.Object value,
                                   long txTimestamp,
                                   java.lang.Object version,
                                   boolean minimalPutOverride)
                            throws org.hibernate.cache.CacheException
        Specified by:
        putFromLoad in interface org.hibernate.cache.access.CollectionRegionAccessStrategy
        Throws:
        org.hibernate.cache.CacheException
        See Also:
        EntityRegionAccessStrategy.putFromLoad(java.lang.Object, java.lang.Object, long, java.lang.Object, boolean)
      • putFromLoad

        public boolean putFromLoad​(java.lang.Object key,
                                   java.lang.Object value,
                                   long txTimestamp,
                                   java.lang.Object version)
                            throws org.hibernate.cache.CacheException
        Specified by:
        putFromLoad in interface org.hibernate.cache.access.CollectionRegionAccessStrategy
        Throws:
        org.hibernate.cache.CacheException
        See Also:
        EntityRegionAccessStrategy.putFromLoad(java.lang.Object, java.lang.Object, long, java.lang.Object)
      • remove

        public void remove​(java.lang.Object key)
                    throws org.hibernate.cache.CacheException
        Specified by:
        remove in interface org.hibernate.cache.access.CollectionRegionAccessStrategy
        Throws:
        org.hibernate.cache.CacheException
        See Also:
        EntityRegionAccessStrategy.remove(java.lang.Object)
      • removeAll

        public void removeAll()
                       throws org.hibernate.cache.CacheException
        Specified by:
        removeAll in interface org.hibernate.cache.access.CollectionRegionAccessStrategy
        Throws:
        org.hibernate.cache.CacheException
        See Also:
        EntityRegionAccessStrategy.removeAll()
      • unlockItem

        public void unlockItem​(java.lang.Object key,
                               org.hibernate.cache.access.SoftLock lock)
                        throws org.hibernate.cache.CacheException
        Specified by:
        unlockItem in interface org.hibernate.cache.access.CollectionRegionAccessStrategy
        Throws:
        org.hibernate.cache.CacheException
        See Also:
        EntityRegionAccessStrategy.unlockItem(java.lang.Object, org.hibernate.cache.access.SoftLock)
      • unlockRegion

        public void unlockRegion​(org.hibernate.cache.access.SoftLock lock)
                          throws org.hibernate.cache.CacheException
        Specified by:
        unlockRegion in interface org.hibernate.cache.access.CollectionRegionAccessStrategy
        Throws:
        org.hibernate.cache.CacheException
        See Also:
        EntityRegionAccessStrategy.unlockRegion(org.hibernate.cache.access.SoftLock)