Class NonStrictReadWriteNaturalIdRegionAccessStrategy

java.lang.Object
org.redisson.hibernate.strategy.NonStrictReadWriteNaturalIdRegionAccessStrategy
All Implemented Interfaces:
org.hibernate.cache.spi.access.NaturalIdRegionAccessStrategy, org.hibernate.cache.spi.access.RegionAccessStrategy

public class NonStrictReadWriteNaturalIdRegionAccessStrategy extends Object implements org.hibernate.cache.spi.access.NaturalIdRegionAccessStrategy
Author:
Nikita Koksharov
  • Constructor Summary

    Constructors
    Constructor
    Description
    NonStrictReadWriteNaturalIdRegionAccessStrategy(org.hibernate.cfg.Settings settings, org.hibernate.cache.spi.GeneralDataRegion region)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    afterInsert(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key, Object value)
     
    boolean
    afterUpdate(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key, Object value, org.hibernate.cache.spi.access.SoftLock lock)
     
    void
     
    void
     
    generateCacheKey(Object[] naturalIdValues, org.hibernate.persister.entity.EntityPersister persister, org.hibernate.engine.spi.SharedSessionContractImplementor session)
     
    get(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key, long txTimestamp)
     
     
    org.hibernate.cache.spi.NaturalIdRegion
     
    boolean
    insert(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key, Object value)
     
    org.hibernate.cache.spi.access.SoftLock
    lockItem(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key, Object version)
     
    org.hibernate.cache.spi.access.SoftLock
     
    boolean
    putFromLoad(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key, Object value, long txTimestamp, Object version)
     
    boolean
    putFromLoad(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key, Object value, long txTimestamp, Object version, boolean minimalPutOverride)
     
    void
    remove(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key)
     
    void
     
    void
    unlockItem(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key, org.hibernate.cache.spi.access.SoftLock lock)
     
    void
    unlockRegion(org.hibernate.cache.spi.access.SoftLock lock)
     
    boolean
    update(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key, Object value)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.hibernate.cache.spi.access.RegionAccessStrategy

    evict, evictAll, lockRegion, putFromLoad, removeAll, unlockRegion
  • Constructor Details

    • NonStrictReadWriteNaturalIdRegionAccessStrategy

      public NonStrictReadWriteNaturalIdRegionAccessStrategy(org.hibernate.cfg.Settings settings, org.hibernate.cache.spi.GeneralDataRegion region)
  • Method Details

    • get

      public Object get(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key, long txTimestamp) throws org.hibernate.cache.CacheException
      Specified by:
      get in interface org.hibernate.cache.spi.access.RegionAccessStrategy
      Throws:
      org.hibernate.cache.CacheException
    • putFromLoad

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

      public org.hibernate.cache.spi.access.SoftLock lockItem(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key, Object version) throws org.hibernate.cache.CacheException
      Specified by:
      lockItem in interface org.hibernate.cache.spi.access.RegionAccessStrategy
      Throws:
      org.hibernate.cache.CacheException
    • unlockItem

      public void unlockItem(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key, org.hibernate.cache.spi.access.SoftLock lock) throws org.hibernate.cache.CacheException
      Specified by:
      unlockItem in interface org.hibernate.cache.spi.access.RegionAccessStrategy
      Throws:
      org.hibernate.cache.CacheException
    • getRegion

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

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

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

      public boolean update(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key, Object value) throws org.hibernate.cache.CacheException
      Specified by:
      update in interface org.hibernate.cache.spi.access.NaturalIdRegionAccessStrategy
      Throws:
      org.hibernate.cache.CacheException
    • afterUpdate

      public boolean afterUpdate(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key, Object value, org.hibernate.cache.spi.access.SoftLock lock) throws org.hibernate.cache.CacheException
      Specified by:
      afterUpdate in interface org.hibernate.cache.spi.access.NaturalIdRegionAccessStrategy
      Throws:
      org.hibernate.cache.CacheException
    • remove

      public void remove(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key) throws org.hibernate.cache.CacheException
      Specified by:
      remove in interface org.hibernate.cache.spi.access.RegionAccessStrategy
      Throws:
      org.hibernate.cache.CacheException
    • generateCacheKey

      public Object generateCacheKey(Object[] naturalIdValues, org.hibernate.persister.entity.EntityPersister persister, org.hibernate.engine.spi.SharedSessionContractImplementor session)
      Specified by:
      generateCacheKey in interface org.hibernate.cache.spi.access.NaturalIdRegionAccessStrategy
    • getNaturalIdValues

      public Object[] getNaturalIdValues(Object cacheKey)
      Specified by:
      getNaturalIdValues in interface org.hibernate.cache.spi.access.NaturalIdRegionAccessStrategy
    • putFromLoad

      public boolean putFromLoad(org.hibernate.engine.spi.SharedSessionContractImplementor session, 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
    • 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