Class CoherenceReadOnlyEntityAccess

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

public class CoherenceReadOnlyEntityAccess extends AbstractCoherenceEntityDataAccess implements org.hibernate.cache.spi.access.EntityDataAccess
An CoherenceReadOnlyEntityAccess is an AbstractCoherenceEntityDataAccess implementing Hibernate's read-only cache concurrency strategy for entity regions.
Author:
Randy Stafford, Gunnar Hillert
  • Constructor Details

    • CoherenceReadOnlyEntityAccess

      public CoherenceReadOnlyEntityAccess(org.hibernate.cache.spi.DomainDataRegion domainDataRegion, org.hibernate.cache.spi.support.DomainDataStorageAccess domainDataStorageAccess, Comparator<?> versionComparator)
      Complete constructor.
      Parameters:
      domainDataRegion - must not be null
      domainDataStorageAccess - must not be null
      versionComparator - must not be null
  • 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
      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