Class NonTxInvalidationCacheAccessDelegate
java.lang.Object
org.infinispan.hibernate.cache.commons.access.InvalidationCacheAccessDelegate
org.infinispan.hibernate.cache.commons.access.NonTxInvalidationCacheAccessDelegate
- All Implemented Interfaces:
AccessDelegate
Delegate for non-transactional caches
- Author:
- Radim Vansa <rvansa@redhat.com>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.infinispan.interceptors.AsyncInterceptorChainprotected final booleanprotected final NonTxPutFromLoadInterceptorFields inherited from class org.infinispan.hibernate.cache.commons.access.InvalidationCacheAccessDelegate
cache, log, putValidator, region, writeCache -
Constructor Summary
ConstructorsConstructorDescriptionNonTxInvalidationCacheAccessDelegate(InfinispanDataRegion region, PutFromLoadValidator validator) -
Method Summary
Modifier and TypeMethodDescriptionbooleanafterInsert(Object session, Object key, Object value, Object version) Called after an item has been inserted (after the transaction completes), instead of calling release().booleanafterUpdate(Object session, Object key, Object value, Object currentVersion, Object previousVersion, org.hibernate.cache.spi.access.SoftLock lock) Called after an item has been updated (after the transaction completes), instead of calling release().booleanCalled after an item has been inserted (before the transaction completes), instead of calling evict().protected voidinvoke(Object session, org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.RemoveCommand command) protected voidregisterClusteredInvalidation(Object session, Object lockOwner, Object key) protected voidregisterLocalInvalidation(Object session, Object lockOwner, Object key) voidCalled after an item has become stale (before the transaction completes).voidCalled to evict data from the entire regionbooleanCalled after an item has been updated (before the transaction completes), instead of calling evict().Methods inherited from class org.infinispan.hibernate.cache.commons.access.InvalidationCacheAccessDelegate
evict, evictAll, get, lockAll, putFromLoad, putFromLoad, unlockAll, unlockItem
-
Field Details
-
invoker
protected final org.infinispan.interceptors.AsyncInterceptorChain invoker -
nonTxPutFromLoadInterceptor
-
isLocal
protected final boolean isLocal
-
-
Constructor Details
-
NonTxInvalidationCacheAccessDelegate
public NonTxInvalidationCacheAccessDelegate(InfinispanDataRegion region, PutFromLoadValidator validator)
-
-
Method Details
-
insert
public boolean insert(Object session, Object key, Object value, Object version) throws org.hibernate.cache.CacheException Description copied from interface:AccessDelegateCalled after an item has been inserted (before the transaction completes), instead of calling evict().- Parameters:
session- Current sessionkey- The item keyvalue- The itemversion- The item's version value- Returns:
- Were the contents of the cache actual changed by this operation?
- Throws:
org.hibernate.cache.CacheException- if the insert fails
-
update
public boolean update(Object session, Object key, Object value, Object currentVersion, Object previousVersion) throws org.hibernate.cache.CacheException Description copied from interface:AccessDelegateCalled after an item has been updated (before the transaction completes), instead of calling evict().- Parameters:
session- Current sessionkey- The item keyvalue- The itemcurrentVersion- The item's current version valuepreviousVersion- The item's previous version value- Returns:
- Whether the contents of the cache actual changed by this operation
- Throws:
org.hibernate.cache.CacheException- if the update fails
-
remove
Description copied from interface:AccessDelegateCalled after an item has become stale (before the transaction completes).- Specified by:
removein interfaceAccessDelegate- Overrides:
removein classInvalidationCacheAccessDelegate- Parameters:
session- Current sessionkey- The key of the item to remove- Throws:
org.hibernate.cache.CacheException- if removing the cached item fails
-
invoke
protected void invoke(Object session, org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.RemoveCommand command) -
afterInsert
Description copied from interface:AccessDelegateCalled after an item has been inserted (after the transaction completes), instead of calling release(). This method is used by "asynchronous" concurrency strategies.- Parameters:
session-key- The item keyvalue- The itemversion- The item's version value- Returns:
- Were the contents of the cache actual changed by this operation?
-
afterUpdate
public boolean afterUpdate(Object session, Object key, Object value, Object currentVersion, Object previousVersion, org.hibernate.cache.spi.access.SoftLock lock) Description copied from interface:AccessDelegateCalled after an item has been updated (after the transaction completes), instead of calling release(). This method is used by "asynchronous" concurrency strategies.- Parameters:
session-key- The item keyvalue- The itemcurrentVersion- The item's current version valuepreviousVersion- The item's previous version valuelock- The lock previously obtained frominvalid reference
#lockItem- Returns:
- Were the contents of the cache actual changed by this operation?
-
removeAll
public void removeAll() throws org.hibernate.cache.CacheExceptionDescription copied from interface:AccessDelegateCalled to evict data from the entire region- Specified by:
removeAllin interfaceAccessDelegate- Overrides:
removeAllin classInvalidationCacheAccessDelegate- Throws:
org.hibernate.cache.CacheException- if eviction the region fails
-
registerLocalInvalidation
-
registerClusteredInvalidation
-