Package org.hibernate.cache.spi.support
Class EntityTransactionalAccess
- java.lang.Object
-
- org.hibernate.cache.spi.support.AbstractCachedDomainDataAccess
-
- org.hibernate.cache.spi.support.AbstractEntityDataAccess
-
- org.hibernate.cache.spi.support.EntityTransactionalAccess
-
- All Implemented Interfaces:
CachedDomainDataAccess,EntityDataAccess,AbstractDomainDataRegion.Destructible
public class EntityTransactionalAccess extends AbstractEntityDataAccess
-
-
Constructor Summary
Constructors Constructor Description EntityTransactionalAccess(DomainDataRegion region, CacheKeysFactory keysFactory, DomainDataStorageAccess storageAccess, EntityDataCachingConfig accessConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanafterInsert(SharedSessionContractImplementor session, java.lang.Object key, java.lang.Object value, java.lang.Object version)Called afterQuery an item has been inserted (afterQuery the transaction completes), instead of calling release().booleanafterUpdate(SharedSessionContractImplementor session, java.lang.Object key, java.lang.Object value, java.lang.Object currentVersion, java.lang.Object previousVersion, SoftLock lock)Called afterQuery an item has been updated (afterQuery the transaction completes), instead of calling release().AccessTypegetAccessType()The type of access implementedbooleaninsert(SharedSessionContractImplementor session, java.lang.Object key, java.lang.Object value, java.lang.Object version)Called afterQuery an item has been inserted (beforeQuery the transaction completes), instead of calling evict().booleanupdate(SharedSessionContractImplementor session, java.lang.Object key, java.lang.Object value, java.lang.Object currentVersion, java.lang.Object previousVersion)Called afterQuery an item has been updated (beforeQuery the transaction completes), instead of calling evict().-
Methods inherited from class org.hibernate.cache.spi.support.AbstractEntityDataAccess
generateCacheKey, getCacheKeyId, lockItem, lockRegion, unlockItem, unlockRegion
-
Methods inherited from class org.hibernate.cache.spi.support.AbstractCachedDomainDataAccess
clearCache, contains, destroy, evict, evictAll, get, getRegion, getStorageAccess, putFromLoad, putFromLoad, remove, removeAll
-
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.CachedDomainDataAccess
contains, evict, evictAll, get, getRegion, putFromLoad, putFromLoad, remove, removeAll
-
-
-
-
Constructor Detail
-
EntityTransactionalAccess
public EntityTransactionalAccess(DomainDataRegion region, CacheKeysFactory keysFactory, DomainDataStorageAccess storageAccess, EntityDataCachingConfig accessConfig)
-
-
Method Detail
-
insert
public boolean insert(SharedSessionContractImplementor session, java.lang.Object key, java.lang.Object value, java.lang.Object version)
Description copied from interface:EntityDataAccessCalled afterQuery an item has been inserted (beforeQuery the transaction completes), instead of calling evict(). This method is used by "synchronous" concurrency strategies.- Parameters:
session- Current sessionkey- The item keyvalue- The itemversion- The item's version value- Returns:
- Were the contents of the cache actually changed by this operation?
-
afterInsert
public boolean afterInsert(SharedSessionContractImplementor session, java.lang.Object key, java.lang.Object value, java.lang.Object version)
Description copied from interface:EntityDataAccessCalled afterQuery an item has been inserted (afterQuery the transaction completes), instead of calling release(). This method is used by "asynchronous" concurrency strategies.- Parameters:
session- Current sessionkey- The item keyvalue- The itemversion- The item's version value- Returns:
- Were the contents of the cache actual changed by this operation?
-
update
public boolean update(SharedSessionContractImplementor session, java.lang.Object key, java.lang.Object value, java.lang.Object currentVersion, java.lang.Object previousVersion)
Description copied from interface:EntityDataAccessCalled afterQuery an item has been updated (beforeQuery the transaction completes), instead of calling evict(). This method is used by "synchronous" concurrency strategies.- Parameters:
session- Current sessionkey- The item keyvalue- The itemcurrentVersion- The item's current version valuepreviousVersion- The item's previous version value- Returns:
- Were the contents of the cache actually changed by this operation?
-
afterUpdate
public boolean afterUpdate(SharedSessionContractImplementor session, java.lang.Object key, java.lang.Object value, java.lang.Object currentVersion, java.lang.Object previousVersion, SoftLock lock)
Description copied from interface:EntityDataAccessCalled afterQuery an item has been updated (afterQuery the transaction completes), instead of calling release(). This method is used by "asynchronous" concurrency strategies.- Parameters:
session- Current sessionkey- The item keyvalue- The itemcurrentVersion- The item's current version valuepreviousVersion- The item's previous version valuelock- The lock previously obtained fromCachedDomainDataAccess.lockItem(org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object, java.lang.Object)- Returns:
- Were the contents of the cache actually changed by this operation?
-
getAccessType
public AccessType getAccessType()
Description copied from interface:CachedDomainDataAccessThe type of access implemented
-
-