org.hibernate.cache.jbc2.access
Class OptimisticTransactionalAccessDelegate
java.lang.Object
org.hibernate.cache.jbc2.access.TransactionalAccessDelegate
org.hibernate.cache.jbc2.access.OptimisticTransactionalAccessDelegate
public class OptimisticTransactionalAccessDelegate
- extends TransactionalAccessDelegate
Defines the strategy for transactional access to entity or collection data in
an optimistic-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.
- Version:
- $Revision: 1 $
- Author:
- Brian Stansberry
Method Summary |
void |
evict(Object key)
Overrides the
superclass by adding a
NonLockingDataVersion to the invocation. |
void |
evictAll()
Overrides the superclass
by adding a NonLockingDataVersion to the invocation. |
Object |
get(Object key,
long txTimestamp)
Overrides the superclass
by ensuring the root
node for the region exists before making the call. |
boolean |
insert(Object key,
Object value,
Object version)
Overrides the
superclass
by adding a DataVersion to the invocation. |
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()
|
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 |
dataDescription
protected final CacheDataDescription dataDescription
OptimisticTransactionalAccessDelegate
public OptimisticTransactionalAccessDelegate(TransactionalDataRegionAdapter region)
evict
public void evict(Object key)
throws CacheException
- Overrides the
superclass
by adding a
NonLockingDataVersion
to the invocation.
- Overrides:
evict
in class TransactionalAccessDelegate
- Throws:
CacheException
evictAll
public void evictAll()
throws CacheException
- Overrides the
superclass
by adding a NonLockingDataVersion
to the invocation.
- Overrides:
evictAll
in class TransactionalAccessDelegate
- Throws:
CacheException
get
public Object get(Object key,
long txTimestamp)
throws CacheException
- Overrides the
superclass
by ensuring the root
node for the region exists
before making the call.
- Overrides:
get
in class TransactionalAccessDelegate
- Throws:
CacheException
insert
public boolean insert(Object key,
Object value,
Object version)
throws CacheException
- Overrides the
superclass
by adding a DataVersion
to the invocation.
- Overrides:
insert
in class TransactionalAccessDelegate
- Throws:
CacheException
putFromLoad
public boolean putFromLoad(Object key,
Object value,
long txTimestamp,
Object version,
boolean minimalPutOverride)
throws CacheException
- Overrides:
putFromLoad
in class TransactionalAccessDelegate
- Throws:
CacheException
putFromLoad
public boolean putFromLoad(Object key,
Object value,
long txTimestamp,
Object version)
throws CacheException
- Overrides:
putFromLoad
in class TransactionalAccessDelegate
- Throws:
CacheException
remove
public void remove(Object key)
throws CacheException
- Overrides:
remove
in class TransactionalAccessDelegate
- Throws:
CacheException
removeAll
public void removeAll()
throws CacheException
- Overrides:
removeAll
in class TransactionalAccessDelegate
- Throws:
CacheException
update
public boolean update(Object key,
Object value,
Object currentVersion,
Object previousVersion)
throws CacheException
- Overrides:
update
in class TransactionalAccessDelegate
- Throws:
CacheException
Copyright © null-null Red Hat Middleware, LLC. All Rights Reserved