类 EntityReadOnlyAccess
- java.lang.Object
-
- org.hibernate.cache.spi.support.AbstractCachedDomainDataAccess
-
- org.hibernate.cache.spi.support.AbstractEntityDataAccess
-
- org.hibernate.cache.spi.support.EntityReadOnlyAccess
-
public class EntityReadOnlyAccess extends AbstractEntityDataAccess
Standard support forEntityDataAccessusing theAccessType.READ_ONLYaccess type.- 作者:
- Steve Ebersole
-
-
构造器概要
构造器 构造器 说明 EntityReadOnlyAccess(DomainDataRegion region, CacheKeysFactory cacheKeysFactory, DomainDataStorageAccess storageAccess, EntityDataCachingConfig config)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanafterInsert(SharedSessionContractImplementor session, Object key, Object value, Object version)Called afterQuery an item has been inserted (afterQuery the transaction completes), instead of calling release().booleanafterUpdate(SharedSessionContractImplementor session, Object key, Object value, Object currentVersion, 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, Object key, Object value, Object version)Called afterQuery an item has been inserted (beforeQuery the transaction completes), instead of calling evict().voidunlockItem(SharedSessionContractImplementor session, Object key, SoftLock lock)Called when we have finished the attempted update/delete (which may or may not have been successful), after transaction completion.booleanupdate(SharedSessionContractImplementor session, Object key, Object value, Object currentVersion, Object previousVersion)Called afterQuery an item has been updated (beforeQuery the transaction completes), instead of calling evict().-
从类继承的方法 org.hibernate.cache.spi.support.AbstractEntityDataAccess
generateCacheKey, getCacheKeyId, lockItem, lockRegion, unlockRegion
-
从类继承的方法 org.hibernate.cache.spi.support.AbstractCachedDomainDataAccess
clearCache, contains, destroy, evict, evictAll, get, getRegion, getStorageAccess, putFromLoad, putFromLoad, remove, removeAll
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 org.hibernate.cache.spi.access.CachedDomainDataAccess
contains, evict, evictAll, get, getRegion, putFromLoad, putFromLoad, remove, removeAll
-
-
-
-
构造器详细资料
-
EntityReadOnlyAccess
public EntityReadOnlyAccess(DomainDataRegion region, CacheKeysFactory cacheKeysFactory, DomainDataStorageAccess storageAccess, EntityDataCachingConfig config)
-
-
方法详细资料
-
getAccessType
public AccessType getAccessType()
从接口复制的说明:CachedDomainDataAccessThe type of access implemented
-
insert
public boolean insert(SharedSessionContractImplementor session, Object key, Object value, Object version)
从接口复制的说明:EntityDataAccessCalled afterQuery an item has been inserted (beforeQuery the transaction completes), instead of calling evict(). This method is used by "synchronous" concurrency strategies.- 参数:
session- Current sessionkey- The item keyvalue- The itemversion- The item's version value- 返回:
- Were the contents of the cache actually changed by this operation?
-
afterInsert
public boolean afterInsert(SharedSessionContractImplementor session, Object key, Object value, Object version)
从接口复制的说明:EntityDataAccessCalled afterQuery an item has been inserted (afterQuery the transaction completes), instead of calling release(). This method is used by "asynchronous" concurrency strategies.- 参数:
session- Current sessionkey- The item keyvalue- The itemversion- The item's version value- 返回:
- Were the contents of the cache actual changed by this operation?
-
unlockItem
public void unlockItem(SharedSessionContractImplementor session, Object key, SoftLock lock)
从接口复制的说明:CachedDomainDataAccessCalled when we have finished the attempted update/delete (which may or may not have been successful), after transaction completion. This method is used by "asynchronous" concurrency strategies.- 指定者:
unlockItem在接口中CachedDomainDataAccess- 覆盖:
unlockItem在类中AbstractEntityDataAccess- 参数:
session- Current session.key- The item keylock- The lock previously obtained fromCachedDomainDataAccess.lockItem(org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object, java.lang.Object)
-
update
public boolean update(SharedSessionContractImplementor session, Object key, Object value, Object currentVersion, Object previousVersion)
从接口复制的说明:EntityDataAccessCalled afterQuery an item has been updated (beforeQuery the transaction completes), instead of calling evict(). This method is used by "synchronous" concurrency strategies.- 参数:
session- Current sessionkey- The item keyvalue- The itemcurrentVersion- The item's current version valuepreviousVersion- The item's previous version value- 返回:
- Were the contents of the cache actually changed by this operation?
-
afterUpdate
public boolean afterUpdate(SharedSessionContractImplementor session, Object key, Object value, Object currentVersion, Object previousVersion, SoftLock lock)
从接口复制的说明:EntityDataAccessCalled afterQuery an item has been updated (afterQuery the transaction completes), instead of calling release(). This method is used by "asynchronous" concurrency strategies.- 参数:
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)- 返回:
- Were the contents of the cache actually changed by this operation?
-
-