public interface AccessDelegate
EntityRegionAccessStrategy
and CollectionRegionAccessStrategy implementations.| Modifier and Type | Method and Description |
|---|---|
boolean |
afterInsert(SessionImplementor session,
java.lang.Object key,
java.lang.Object value,
java.lang.Object version)
Called after an item has been inserted (after the transaction completes),
instead of calling release().
|
boolean |
afterUpdate(SessionImplementor session,
java.lang.Object key,
java.lang.Object value,
java.lang.Object currentVersion,
java.lang.Object previousVersion,
SoftLock lock)
Called after an item has been updated (after the transaction completes),
instead of calling release().
|
void |
evict(java.lang.Object key)
Forcibly evict an item from the cache immediately without regard for transaction
isolation.
|
void |
evictAll()
Forcibly evict all items from the cache immediately without regard for transaction
isolation.
|
java.lang.Object |
get(SessionImplementor session,
java.lang.Object key,
long txTimestamp) |
boolean |
insert(SessionImplementor session,
java.lang.Object key,
java.lang.Object value,
java.lang.Object version)
Called after an item has been inserted (before the transaction completes),
instead of calling evict().
|
boolean |
putFromLoad(SessionImplementor session,
java.lang.Object key,
java.lang.Object value,
long txTimestamp,
java.lang.Object version)
Attempt to cache an object, after loading from the database.
|
boolean |
putFromLoad(SessionImplementor session,
java.lang.Object key,
java.lang.Object value,
long txTimestamp,
java.lang.Object version,
boolean minimalPutOverride)
Attempt to cache an object, after loading from the database, explicitly
specifying the minimalPut behavior.
|
void |
remove(SessionImplementor session,
java.lang.Object key)
Called after an item has become stale (before the transaction completes).
|
void |
removeAll()
Called to evict data from the entire region
|
void |
unlockItem(SessionImplementor session,
java.lang.Object key)
Called when we have finished the attempted update/delete (which may or
may not have been successful), after transaction completion.
|
boolean |
update(SessionImplementor session,
java.lang.Object key,
java.lang.Object value,
java.lang.Object currentVersion,
java.lang.Object previousVersion)
Called after an item has been updated (before the transaction completes),
instead of calling evict().
|
java.lang.Object get(SessionImplementor session, java.lang.Object key, long txTimestamp) throws CacheException
CacheExceptionboolean putFromLoad(SessionImplementor session, java.lang.Object key, java.lang.Object value, long txTimestamp, java.lang.Object version)
session - Current sessionkey - The item keyvalue - The itemtxTimestamp - a timestamp prior to the transaction start timeversion - the item version numberboolean putFromLoad(SessionImplementor session, java.lang.Object key, java.lang.Object value, long txTimestamp, java.lang.Object version, boolean minimalPutOverride) throws CacheException
session - Current session.key - The item keyvalue - The itemtxTimestamp - a timestamp prior to the transaction start timeversion - the item version numberminimalPutOverride - Explicit minimalPut flagCacheException - Propogated from underlying Regionboolean insert(SessionImplementor session, java.lang.Object key, java.lang.Object value, java.lang.Object version) throws CacheException
session - Current sessionkey - The item keyvalue - The itemversion - The item's version valueCacheException - if the insert failsboolean update(SessionImplementor session, java.lang.Object key, java.lang.Object value, java.lang.Object currentVersion, java.lang.Object previousVersion) throws CacheException
session - Current sessionkey - The item keyvalue - The itemcurrentVersion - The item's current version valuepreviousVersion - The item's previous version valueCacheException - if the update failsvoid remove(SessionImplementor session, java.lang.Object key) throws CacheException
session - Current sessionkey - The key of the item to removeCacheException - if removing the cached item failsvoid removeAll()
throws CacheException
CacheException - if eviction the region failsvoid evict(java.lang.Object key)
throws CacheException
key - The key of the item to removeCacheException - if evicting the item failsvoid evictAll()
throws CacheException
CacheException - if evicting items failsvoid unlockItem(SessionImplementor session, java.lang.Object key) throws CacheException
session - key - The item keyCacheException - Propogated from underlying Regionboolean afterInsert(SessionImplementor session, java.lang.Object key, java.lang.Object value, java.lang.Object version)
session - key - The item keyvalue - The itemversion - The item's version valueCacheException - Propagated from underlying Regionboolean afterUpdate(SessionImplementor session, java.lang.Object key, java.lang.Object value, java.lang.Object currentVersion, java.lang.Object previousVersion, SoftLock lock)
session - key - The item keyvalue - The itemcurrentVersion - The item's current version valuepreviousVersion - The item's previous version valuelock - The lock previously obtained from #lockItemCacheException - Propagated from underlying RegionCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.