Class ReadWriteEntityRegionAccessStrategy

java.lang.Object
org.redisson.hibernate.strategy.AbstractReadWriteAccessStrategy
org.redisson.hibernate.strategy.ReadWriteEntityRegionAccessStrategy
All Implemented Interfaces:
org.hibernate.cache.spi.access.EntityRegionAccessStrategy, org.hibernate.cache.spi.access.RegionAccessStrategy

public class ReadWriteEntityRegionAccessStrategy extends AbstractReadWriteAccessStrategy implements org.hibernate.cache.spi.access.EntityRegionAccessStrategy
Author:
Nikita Koksharov
  • Constructor Details

    • ReadWriteEntityRegionAccessStrategy

      public ReadWriteEntityRegionAccessStrategy(org.hibernate.cfg.Settings settings, org.hibernate.cache.spi.GeneralDataRegion region, RMapCache<Object,Object> mapCache)
  • Method Details

    • getRegion

      public org.hibernate.cache.spi.EntityRegion getRegion()
      Specified by:
      getRegion in interface org.hibernate.cache.spi.access.EntityRegionAccessStrategy
    • insert

      public boolean insert(Object key, Object value, Object version) throws org.hibernate.cache.CacheException
      Specified by:
      insert in interface org.hibernate.cache.spi.access.EntityRegionAccessStrategy
      Throws:
      org.hibernate.cache.CacheException
    • afterInsert

      public boolean afterInsert(Object key, Object value, Object version) throws org.hibernate.cache.CacheException
      Specified by:
      afterInsert in interface org.hibernate.cache.spi.access.EntityRegionAccessStrategy
      Throws:
      org.hibernate.cache.CacheException
    • update

      public boolean update(Object key, Object value, Object currentVersion, Object previousVersion) throws org.hibernate.cache.CacheException
      Specified by:
      update in interface org.hibernate.cache.spi.access.EntityRegionAccessStrategy
      Throws:
      org.hibernate.cache.CacheException
    • afterUpdate

      public boolean afterUpdate(Object key, Object value, Object currentVersion, Object previousVersion, org.hibernate.cache.spi.access.SoftLock lock) throws org.hibernate.cache.CacheException
      Specified by:
      afterUpdate in interface org.hibernate.cache.spi.access.EntityRegionAccessStrategy
      Throws:
      org.hibernate.cache.CacheException
    • putFromLoad

      public boolean putFromLoad(Object key, Object value, long txTimestamp, Object version) throws org.hibernate.cache.CacheException
      Specified by:
      putFromLoad in interface org.hibernate.cache.spi.access.RegionAccessStrategy
      Throws:
      org.hibernate.cache.CacheException
    • lockRegion

      public org.hibernate.cache.spi.access.SoftLock lockRegion() throws org.hibernate.cache.CacheException
      Specified by:
      lockRegion in interface org.hibernate.cache.spi.access.RegionAccessStrategy
      Throws:
      org.hibernate.cache.CacheException
    • unlockRegion

      public void unlockRegion(org.hibernate.cache.spi.access.SoftLock lock) throws org.hibernate.cache.CacheException
      Specified by:
      unlockRegion in interface org.hibernate.cache.spi.access.RegionAccessStrategy
      Throws:
      org.hibernate.cache.CacheException
    • remove

      public void remove(Object key) throws org.hibernate.cache.CacheException
      Specified by:
      remove in interface org.hibernate.cache.spi.access.RegionAccessStrategy
      Throws:
      org.hibernate.cache.CacheException
    • removeAll

      public void removeAll() throws org.hibernate.cache.CacheException
      Specified by:
      removeAll in interface org.hibernate.cache.spi.access.RegionAccessStrategy
      Throws:
      org.hibernate.cache.CacheException
    • evict

      public void evict(Object key) throws org.hibernate.cache.CacheException
      Specified by:
      evict in interface org.hibernate.cache.spi.access.RegionAccessStrategy
      Throws:
      org.hibernate.cache.CacheException
    • evictAll

      public void evictAll() throws org.hibernate.cache.CacheException
      Specified by:
      evictAll in interface org.hibernate.cache.spi.access.RegionAccessStrategy
      Throws:
      org.hibernate.cache.CacheException