Package net.sf.ehcache.transaction
Interface SoftLockManager
-
- All Known Implementing Classes:
AbstractSoftLockManager,SoftLockManagerImpl
public interface SoftLockManagerA factory forSoftLocks- Author:
- Ludovic Orban
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclearSoftLock(SoftLock softLock)Clear a soft lockjava.util.Set<SoftLock>collectAllSoftLocksForTransactionID(TransactionID transactionID)Get a the soft locks of the specified transaction IDSoftLockIDcreateSoftLockID(TransactionID transactionID, java.lang.Object key, Element newElement, Element oldElement)Create a new soft lock ID and associated soft lock if necessary.SoftLockfindSoftLockById(SoftLockID softLockId)Find a previously created and still existing soft lockjava.util.Set<java.lang.Object>getKeysInvisibleInContext(LocalTransactionContext transactionContext, Store underlyingStore)Get a Set of keys protected by soft locks which must not be visible to a transaction context according to the isolation level.
-
-
-
Method Detail
-
createSoftLockID
SoftLockID createSoftLockID(TransactionID transactionID, java.lang.Object key, Element newElement, Element oldElement)
Create a new soft lock ID and associated soft lock if necessary.- Parameters:
transactionID- the transaction ID under which the soft lock will operatekey- the key of the Element this soft lock is protectingnewElement- the new ElementoldElement- the actual Element- Returns:
- the soft lock ID
-
clearSoftLock
void clearSoftLock(SoftLock softLock)
Clear a soft lock- Parameters:
softLock- the lock to clear
-
findSoftLockById
SoftLock findSoftLockById(SoftLockID softLockId)
Find a previously created and still existing soft lock- Parameters:
softLockId- the soft lock's ID- Returns:
- the soft lock, or null if no soft lock with the corresponding ID could be found
-
getKeysInvisibleInContext
java.util.Set<java.lang.Object> getKeysInvisibleInContext(LocalTransactionContext transactionContext, Store underlyingStore)
Get a Set of keys protected by soft locks which must not be visible to a transaction context according to the isolation level.- Parameters:
transactionContext- the transaction context- Returns:
- a Set of keys invisible to the context
-
collectAllSoftLocksForTransactionID
java.util.Set<SoftLock> collectAllSoftLocksForTransactionID(TransactionID transactionID)
Get a the soft locks of the specified transaction ID- Parameters:
transactionID- the transaction ID- Returns:
- a Set of SoftLocks
-
-