org.hibernate.cache.infinispan.access
Class TransactionalAccessDelegate

java.lang.Object
  extended by org.hibernate.cache.infinispan.access.TransactionalAccessDelegate

public class TransactionalAccessDelegate
extends Object

Defines the strategy for transactional access to entity or collection data in a Infinispan instance.

The intent of this class is to encapsulate common code and serve as a delegate for EntityRegionAccessStrategy and CollectionRegionAccessStrategy implementations.

Since:
3.5

Field Summary
protected  CacheAdapter cacheAdapter
           
protected  PutFromLoadValidator putValidator
           
protected  BaseRegion region
           
 
Constructor Summary
TransactionalAccessDelegate(BaseRegion region, PutFromLoadValidator validator)
           
 
Method Summary
 boolean afterInsert(Object key, Object value, Object version)
           
 boolean afterUpdate(Object key, Object value, Object currentVersion, Object previousVersion, SoftLock lock)
           
 void evict(Object key)
           
 void evictAll()
           
 Object get(Object key, long txTimestamp)
           
 boolean insert(Object key, Object value, Object version)
           
 SoftLock lockItem(Object key, Object version)
           
 SoftLock lockRegion()
           
 boolean putFromLoad(Object key, Object value, long txTimestamp, Object version)
           
 boolean putFromLoad(Object key, Object value, long txTimestamp, Object version, boolean minimalPutOverride)
           
 void remove(Object key)
           
 void removeAll()
           
 void unlockItem(Object key, SoftLock lock)
           
 void unlockRegion(SoftLock lock)
           
 boolean update(Object key, Object value, Object currentVersion, Object previousVersion)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cacheAdapter

protected final CacheAdapter cacheAdapter

region

protected final BaseRegion region

putValidator

protected final PutFromLoadValidator putValidator
Constructor Detail

TransactionalAccessDelegate

public TransactionalAccessDelegate(BaseRegion region,
                                   PutFromLoadValidator validator)
Method Detail

get

public Object get(Object key,
                  long txTimestamp)
           throws CacheException
Throws:
CacheException

putFromLoad

public boolean putFromLoad(Object key,
                           Object value,
                           long txTimestamp,
                           Object version)

putFromLoad

public boolean putFromLoad(Object key,
                           Object value,
                           long txTimestamp,
                           Object version,
                           boolean minimalPutOverride)
                    throws CacheException
Throws:
CacheException

lockItem

public SoftLock lockItem(Object key,
                         Object version)
                  throws CacheException
Throws:
CacheException

lockRegion

public SoftLock lockRegion()
                    throws CacheException
Throws:
CacheException

unlockItem

public void unlockItem(Object key,
                       SoftLock lock)
                throws CacheException
Throws:
CacheException

unlockRegion

public void unlockRegion(SoftLock lock)
                  throws CacheException
Throws:
CacheException

insert

public boolean insert(Object key,
                      Object value,
                      Object version)
               throws CacheException
Throws:
CacheException

afterInsert

public boolean afterInsert(Object key,
                           Object value,
                           Object version)
                    throws CacheException
Throws:
CacheException

update

public boolean update(Object key,
                      Object value,
                      Object currentVersion,
                      Object previousVersion)
               throws CacheException
Throws:
CacheException

afterUpdate

public boolean afterUpdate(Object key,
                           Object value,
                           Object currentVersion,
                           Object previousVersion,
                           SoftLock lock)
                    throws CacheException
Throws:
CacheException

remove

public void remove(Object key)
            throws CacheException
Throws:
CacheException

removeAll

public void removeAll()
               throws CacheException
Throws:
CacheException

evict

public void evict(Object key)
           throws CacheException
Throws:
CacheException

evictAll

public void evictAll()
              throws CacheException
Throws:
CacheException


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.