public class NonStrictAccessDelegate extends java.lang.Object implements AccessDelegate
| Constructor and Description |
|---|
NonStrictAccessDelegate(BaseTransactionalDataRegion region) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
afterInsert(SharedSessionContractImplementor 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(SharedSessionContractImplementor 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(SharedSessionContractImplementor session,
java.lang.Object key,
long txTimestamp) |
protected java.lang.Object |
getVersion(java.lang.Object value) |
protected java.lang.Object |
getVersioned(java.lang.Object value,
java.lang.Object version,
long timestamp) |
boolean |
insert(SharedSessionContractImplementor 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(SharedSessionContractImplementor 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(SharedSessionContractImplementor 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(SharedSessionContractImplementor 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(SharedSessionContractImplementor 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(SharedSessionContractImplementor 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().
|
public NonStrictAccessDelegate(BaseTransactionalDataRegion region)
public java.lang.Object get(SharedSessionContractImplementor session, java.lang.Object key, long txTimestamp) throws CacheException
get in interface AccessDelegateCacheExceptionpublic boolean putFromLoad(SharedSessionContractImplementor session, java.lang.Object key, java.lang.Object value, long txTimestamp, java.lang.Object version)
AccessDelegateputFromLoad in interface AccessDelegatesession - Current sessionkey - The item keyvalue - The itemtxTimestamp - a timestamp prior to the transaction start timeversion - the item version numberpublic boolean putFromLoad(SharedSessionContractImplementor session, java.lang.Object key, java.lang.Object value, long txTimestamp, java.lang.Object version, boolean minimalPutOverride) throws CacheException
AccessDelegateputFromLoad in interface AccessDelegatesession - 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 Regionpublic boolean insert(SharedSessionContractImplementor session, java.lang.Object key, java.lang.Object value, java.lang.Object version) throws CacheException
AccessDelegateinsert in interface AccessDelegatesession - Current sessionkey - The item keyvalue - The itemversion - The item's version valueCacheException - if the insert failspublic boolean update(SharedSessionContractImplementor session, java.lang.Object key, java.lang.Object value, java.lang.Object currentVersion, java.lang.Object previousVersion) throws CacheException
AccessDelegateupdate in interface AccessDelegatesession - Current sessionkey - The item keyvalue - The itemcurrentVersion - The item's current version valuepreviousVersion - The item's previous version valueCacheException - if the update failspublic void remove(SharedSessionContractImplementor session, java.lang.Object key) throws CacheException
AccessDelegateremove in interface AccessDelegatesession - Current sessionkey - The key of the item to removeCacheException - if removing the cached item failspublic void removeAll()
throws CacheException
AccessDelegateremoveAll in interface AccessDelegateCacheException - if eviction the region failspublic void evict(java.lang.Object key)
throws CacheException
AccessDelegateevict in interface AccessDelegatekey - The key of the item to removeCacheException - if evicting the item failspublic void evictAll()
throws CacheException
AccessDelegateevictAll in interface AccessDelegateCacheException - if evicting items failspublic void unlockItem(SharedSessionContractImplementor session, java.lang.Object key) throws CacheException
AccessDelegateunlockItem in interface AccessDelegatekey - The item keyCacheException - Propogated from underlying Regionpublic boolean afterInsert(SharedSessionContractImplementor session, java.lang.Object key, java.lang.Object value, java.lang.Object version)
AccessDelegateafterInsert in interface AccessDelegatekey - The item keyvalue - The itemversion - The item's version valuepublic boolean afterUpdate(SharedSessionContractImplementor session, java.lang.Object key, java.lang.Object value, java.lang.Object currentVersion, java.lang.Object previousVersion, SoftLock lock)
AccessDelegateafterUpdate in interface AccessDelegatekey - The item keyvalue - The itemcurrentVersion - The item's current version valuepreviousVersion - The item's previous version valuelock - The lock previously obtained from #lockItemprotected java.lang.Object getVersion(java.lang.Object value)
protected java.lang.Object getVersioned(java.lang.Object value,
java.lang.Object version,
long timestamp)
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.