org.hibernate.cache.jbc2.entity
Class TransactionalAccess
java.lang.Object
org.hibernate.cache.jbc2.entity.TransactionalAccess
- All Implemented Interfaces:
- EntityRegionAccessStrategy
- Direct Known Subclasses:
- OptimisticTransactionalAccess, ReadOnlyAccess
public class TransactionalAccess
- extends Object
- implements EntityRegionAccessStrategy
Defines the strategy for transactional access to entity data in a
pessimistic-locking JBossCache using its 2.x APIs
- Author:
- Steve Ebersole
|
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)
|
EntityRegion |
getRegion()
|
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 |
region
protected final EntityRegionImpl region
TransactionalAccess
public TransactionalAccess(EntityRegionImpl region)
TransactionalAccess
protected TransactionalAccess(EntityRegionImpl region,
TransactionalAccessDelegate delegate)
getRegion
public EntityRegion getRegion()
- Specified by:
getRegion in interface EntityRegionAccessStrategy
get
public Object get(Object key,
long txTimestamp)
throws CacheException
- Specified by:
get in interface EntityRegionAccessStrategy
- Throws:
CacheException
putFromLoad
public boolean putFromLoad(Object key,
Object value,
long txTimestamp,
Object version)
throws CacheException
- Specified by:
putFromLoad in interface EntityRegionAccessStrategy
- Throws:
CacheException
putFromLoad
public boolean putFromLoad(Object key,
Object value,
long txTimestamp,
Object version,
boolean minimalPutOverride)
throws CacheException
- Specified by:
putFromLoad in interface EntityRegionAccessStrategy
- Throws:
CacheException
insert
public boolean insert(Object key,
Object value,
Object version)
throws CacheException
- Specified by:
insert in interface EntityRegionAccessStrategy
- Throws:
CacheException
update
public boolean update(Object key,
Object value,
Object currentVersion,
Object previousVersion)
throws CacheException
- Specified by:
update in interface EntityRegionAccessStrategy
- Throws:
CacheException
remove
public void remove(Object key)
throws CacheException
- Specified by:
remove in interface EntityRegionAccessStrategy
- Throws:
CacheException
removeAll
public void removeAll()
throws CacheException
- Specified by:
removeAll in interface EntityRegionAccessStrategy
- Throws:
CacheException
evict
public void evict(Object key)
throws CacheException
- Specified by:
evict in interface EntityRegionAccessStrategy
- Throws:
CacheException
evictAll
public void evictAll()
throws CacheException
- Specified by:
evictAll in interface EntityRegionAccessStrategy
- Throws:
CacheException
lockItem
public SoftLock lockItem(Object key,
Object version)
throws CacheException
- Specified by:
lockItem in interface EntityRegionAccessStrategy
- Throws:
CacheException
lockRegion
public SoftLock lockRegion()
throws CacheException
- Specified by:
lockRegion in interface EntityRegionAccessStrategy
- Throws:
CacheException
unlockItem
public void unlockItem(Object key,
SoftLock lock)
throws CacheException
- Specified by:
unlockItem in interface EntityRegionAccessStrategy
- Throws:
CacheException
unlockRegion
public void unlockRegion(SoftLock lock)
throws CacheException
- Specified by:
unlockRegion in interface EntityRegionAccessStrategy
- Throws:
CacheException
afterInsert
public boolean afterInsert(Object key,
Object value,
Object version)
throws CacheException
- Specified by:
afterInsert in interface EntityRegionAccessStrategy
- Throws:
CacheException
afterUpdate
public boolean afterUpdate(Object key,
Object value,
Object currentVersion,
Object previousVersion,
SoftLock lock)
throws CacheException
- Specified by:
afterUpdate in interface EntityRegionAccessStrategy
- Throws:
CacheException
Copyright © 2008 Hibernate.org. All Rights Reserved.