Class CoherenceNonstrictReadWriteEntityAccess

java.lang.Object
com.oracle.coherence.hibernate.cache.v53.access.AbstractCoherenceEntityDataAccess
com.oracle.coherence.hibernate.cache.v53.access.CoherenceNonstrictReadWriteEntityAccess
All Implemented Interfaces:
org.hibernate.cache.spi.access.CachedDomainDataAccess, org.hibernate.cache.spi.access.EntityDataAccess

public class CoherenceNonstrictReadWriteEntityAccess extends AbstractCoherenceEntityDataAccess implements org.hibernate.cache.spi.access.EntityDataAccess
A CoherenceNonstrictReadWriteEntityAccess is an AbstractCoherenceEntityDataAccess implementing Hibernate's nonstrict-read-write cache concurrency strategy for an entity region.
Author:
Randy Stafford, Gunnar Hillert
  • Constructor Details

    • CoherenceNonstrictReadWriteEntityAccess

      public CoherenceNonstrictReadWriteEntityAccess(org.hibernate.cache.spi.DomainDataRegion domainDataRegion, org.hibernate.cache.spi.support.DomainDataStorageAccess domainDataStorageAccess, Comparator<?> versionComparator)
      Complete constructor.
      Parameters:
      domainDataRegion - the domain data region
      domainDataStorageAccess - the domain data storage access
      versionComparator - the version comparator
  • Method Details

    • insert

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

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

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

      public boolean afterUpdate(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key, Object value, Object currentVersion, Object previousVersion, org.hibernate.cache.spi.access.SoftLock lock) throws org.hibernate.cache.CacheException

      Implementation notes

      Specified by:
      afterUpdate in interface org.hibernate.cache.spi.access.EntityDataAccess
      Throws:
      org.hibernate.cache.CacheException
    • generateCacheKey

      public Object generateCacheKey(Object id, org.hibernate.persister.entity.EntityPersister persister, org.hibernate.engine.spi.SessionFactoryImplementor sessionFactoryImplementor, String tenantIdentifier)
      Specified by:
      generateCacheKey in interface org.hibernate.cache.spi.access.EntityDataAccess
    • getCacheKeyId

      public Object getCacheKeyId(Object cacheKey)
      Specified by:
      getCacheKeyId in interface org.hibernate.cache.spi.access.EntityDataAccess
    • getAccessType

      public org.hibernate.cache.spi.access.AccessType getAccessType()
      Specified by:
      getAccessType in interface org.hibernate.cache.spi.access.CachedDomainDataAccess
    • contains

      public boolean contains(Object key)
      Specified by:
      contains in interface org.hibernate.cache.spi.access.CachedDomainDataAccess
      Overrides:
      contains in class AbstractCoherenceEntityDataAccess