public class EntityReadOnlyAccess extends AbstractEntityDataAccess
Standard support for EntityDataAccess
using the AccessType.READ_ONLY access type.
| Constructor and Description |
|---|
EntityReadOnlyAccess(DomainDataRegion region,
CacheKeysFactory cacheKeysFactory,
DomainDataStorageAccess storageAccess,
EntityDataCachingConfig config) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
afterInsert(SharedSessionContractImplementor session,
Object key,
Object value,
Object version)
Called afterQuery an item has been inserted (afterQuery the transaction completes),
instead of calling release().
|
boolean |
afterUpdate(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().
|
AccessType |
getAccessType()
The type of access implemented
|
boolean |
insert(SharedSessionContractImplementor session,
Object key,
Object value,
Object version)
Called afterQuery an item has been inserted (beforeQuery the transaction completes),
instead of calling evict().
|
void |
unlockItem(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.
|
boolean |
update(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().
|
generateCacheKey, getCacheKeyId, lockItem, lockRegion, unlockRegionclearCache, contains, destroy, evict, evictAll, get, getRegion, getStorageAccess, putFromLoad, putFromLoad, remove, removeAllclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontains, evict, evictAll, get, getRegion, putFromLoad, putFromLoad, remove, removeAllpublic EntityReadOnlyAccess(DomainDataRegion region, CacheKeysFactory cacheKeysFactory, DomainDataStorageAccess storageAccess, EntityDataCachingConfig config)
public AccessType getAccessType()
CachedDomainDataAccessThe type of access implemented
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 valuepublic 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 valuepublic 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 in interface CachedDomainDataAccessunlockItem in class AbstractEntityDataAccesssession - Current session.key - The item keylock - The lock previously obtained from CachedDomainDataAccess.lockItem(org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object, java.lang.Object)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 valuepublic 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 from CachedDomainDataAccess.lockItem(org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object, java.lang.Object)Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.