public class NonTxInvalidationCacheAccessDelegate extends InvalidationCacheAccessDelegate
cache, log, putValidator, region, TRACE_ENABLED, writeCache
Constructor and Description |
---|
NonTxInvalidationCacheAccessDelegate(BaseRegion region,
PutFromLoadValidator validator) |
Modifier and Type | Method and Description |
---|---|
boolean |
afterInsert(SessionImplementor session,
Object key,
Object value,
Object version)
Called after an item has been inserted (after the transaction completes),
instead of calling release().
|
boolean |
afterUpdate(SessionImplementor session,
Object key,
Object value,
Object currentVersion,
Object previousVersion,
SoftLock lock)
Called after an item has been updated (after the transaction completes),
instead of calling release().
|
boolean |
insert(SessionImplementor session,
Object key,
Object value,
Object version)
Called after an item has been inserted (before the transaction completes),
instead of calling evict().
|
protected boolean |
isCommitted(SessionImplementor session) |
void |
unlockItem(SessionImplementor session,
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,
Object key,
Object value,
Object currentVersion,
Object previousVersion)
Called after an item has been updated (before the transaction completes),
instead of calling evict().
|
evict, evictAll, get, putFromLoad, putFromLoad, remove, removeAll
public NonTxInvalidationCacheAccessDelegate(BaseRegion region, PutFromLoadValidator validator)
public boolean insert(SessionImplementor session, Object key, Object value, Object version) throws CacheException
AccessDelegate
session
- Current sessionkey
- The item keyvalue
- The itemversion
- The item's version valueCacheException
- if the insert failspublic boolean update(SessionImplementor session, Object key, Object value, Object currentVersion, Object previousVersion) throws CacheException
AccessDelegate
session
- Current sessionkey
- The item keyvalue
- The itemcurrentVersion
- The item's current version valuepreviousVersion
- The item's previous version valueCacheException
- if the update failsprotected boolean isCommitted(SessionImplementor session)
public void unlockItem(SessionImplementor session, Object key) throws CacheException
AccessDelegate
unlockItem
in interface AccessDelegate
unlockItem
in class InvalidationCacheAccessDelegate
key
- The item keyCacheException
- Propogated from underlying Region
public boolean afterInsert(SessionImplementor session, Object key, Object value, Object version)
AccessDelegate
key
- The item keyvalue
- The itemversion
- The item's version valuepublic boolean afterUpdate(SessionImplementor session, Object key, Object value, Object currentVersion, Object previousVersion, SoftLock lock)
AccessDelegate
key
- The item keyvalue
- The itemcurrentVersion
- The item's current version valuepreviousVersion
- The item's previous version valuelock
- The lock previously obtained from #lockItem
Copyright © 2001-2017 Red Hat, Inc. All Rights Reserved.