Class NonTxInvalidationCacheAccessDelegate

java.lang.Object
org.infinispan.hibernate.cache.commons.access.InvalidationCacheAccessDelegate
org.infinispan.hibernate.cache.commons.access.NonTxInvalidationCacheAccessDelegate
All Implemented Interfaces:
AccessDelegate

public class NonTxInvalidationCacheAccessDelegate extends InvalidationCacheAccessDelegate
Delegate for non-transactional caches
Author:
Radim Vansa <rvansa@redhat.com>
  • Field Details

    • invoker

      protected final org.infinispan.interceptors.AsyncInterceptorChain invoker
    • nonTxPutFromLoadInterceptor

      protected final NonTxPutFromLoadInterceptor nonTxPutFromLoadInterceptor
    • isLocal

      protected final boolean isLocal
  • Constructor Details

  • Method Details

    • insert

      public boolean insert(Object session, Object key, Object value, Object version) throws org.hibernate.cache.CacheException
      Description copied from interface: AccessDelegate
      Called after an item has been inserted (before the transaction completes), instead of calling evict().
      Parameters:
      session - Current session
      key - The item key
      value - The item
      version - 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: AccessDelegate
      Called after an item has been updated (before the transaction completes), instead of calling evict().
      Parameters:
      session - Current session
      key - The item key
      value - The item
      currentVersion - The item's current version value
      previousVersion - 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

      public void remove(Object session, Object key) throws org.hibernate.cache.CacheException
      Description copied from interface: AccessDelegate
      Called after an item has become stale (before the transaction completes).
      Specified by:
      remove in interface AccessDelegate
      Overrides:
      remove in class InvalidationCacheAccessDelegate
      Parameters:
      session - Current session
      key - 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

      public boolean afterInsert(Object session, Object key, Object value, Object version)
      Description copied from interface: AccessDelegate
      Called after an item has been inserted (after the transaction completes), instead of calling release(). This method is used by "asynchronous" concurrency strategies.
      key - The item key
      value - The item
      version - 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: AccessDelegate
      Called after an item has been updated (after the transaction completes), instead of calling release(). This method is used by "asynchronous" concurrency strategies.
      key - The item key
      value - The item
      currentVersion - The item's current version value
      previousVersion - The item's previous version value
      lock - The lock previously obtained from #lockItem
      Returns:
      Were the contents of the cache actual changed by this operation?
    • removeAll

      public void removeAll() throws org.hibernate.cache.CacheException
      Description copied from interface: AccessDelegate
      Called to evict data from the entire region
      Specified by:
      removeAll in interface AccessDelegate
      Overrides:
      removeAll in class InvalidationCacheAccessDelegate
      Throws:
      org.hibernate.cache.CacheException - if eviction the region fails
    • registerLocalInvalidation

      protected void registerLocalInvalidation(Object session, Object lockOwner, Object key)
    • registerClusteredInvalidation

      protected void registerClusteredInvalidation(Object session, Object lockOwner, Object key)