org.hibernate.cache.jbc2.access
Class TransactionalAccessDelegate
java.lang.Object
org.hibernate.cache.jbc2.access.TransactionalAccessDelegate
- Direct Known Subclasses:
- OptimisticTransactionalAccessDelegate
public class TransactionalAccessDelegate
- extends Object
Defines the strategy for transactional access to entity or collection data in
a pessimistic-locking JBoss Cache using its 2.x APIs.
The intent of this class is to encapsulate common code and serve as a
delegate for EntityRegionAccessStrategy
and
CollectionRegionAccessStrategy
implementations.
- Author:
- Brian Stansberry
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 |
cache
protected final org.jboss.cache.Cache cache
regionFqn
protected final org.jboss.cache.Fqn regionFqn
region
protected final BasicRegionAdapter region
TransactionalAccessDelegate
public TransactionalAccessDelegate(BasicRegionAdapter adapter)
get
public Object get(Object key,
long txTimestamp)
throws CacheException
- Throws:
CacheException
putFromLoad
public boolean putFromLoad(Object key,
Object value,
long txTimestamp,
Object version)
throws CacheException
- Throws:
CacheException
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 © null-null Red Hat Middleware, LLC. All Rights Reserved