|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ehcache.transaction.AbstractSoftLockManager
public abstract class AbstractSoftLockManager
An abstract map backed soft lock manager.
Constructor Summary | |
---|---|
AbstractSoftLockManager(String cacheName,
SoftLockFactory lockFactory)
Create an abstract soft lock manager for the given cache name and soft lock factory. |
Method Summary | |
---|---|
void |
clearSoftLock(SoftLock softLock)
Clear a soft lock |
Set<SoftLock> |
collectAllSoftLocksForTransactionID(TransactionID transactionID)
Get a the soft locks of the specified transaction ID |
SoftLockID |
createSoftLockID(TransactionID transactionID,
Object key,
Element newElement,
Element oldElement)
Create a new soft lock ID and associated soft lock if necessary. |
SoftLock |
findSoftLockById(SoftLockID softLockId)
Find a previously created and still existing soft lock |
protected abstract ConcurrentMap<SoftLockID,SoftLock> |
getAllLocks()
Return the map of all soft locks. |
Set<Object> |
getKeysInvisibleInContext(LocalTransactionContext currentTransactionContext,
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. |
protected abstract ConcurrentMap<SoftLockID,Boolean> |
getNewKeyLocks()
Return the map of all locks that are for new keys. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractSoftLockManager(String cacheName, SoftLockFactory lockFactory)
cacheName
- name of the cachelockFactory
- factory of managed locksMethod Detail |
---|
protected abstract ConcurrentMap<SoftLockID,SoftLock> getAllLocks()
protected abstract ConcurrentMap<SoftLockID,Boolean> getNewKeyLocks()
public SoftLockID createSoftLockID(TransactionID transactionID, Object key, Element newElement, Element oldElement)
createSoftLockID
in interface SoftLockManager
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
public SoftLock findSoftLockById(SoftLockID softLockId)
findSoftLockById
in interface SoftLockManager
softLockId
- the soft lock's ID
public Set<Object> getKeysInvisibleInContext(LocalTransactionContext currentTransactionContext, Store underlyingStore)
getKeysInvisibleInContext
in interface SoftLockManager
currentTransactionContext
- the transaction context
public Set<SoftLock> collectAllSoftLocksForTransactionID(TransactionID transactionID)
collectAllSoftLocksForTransactionID
in interface SoftLockManager
transactionID
- the transaction ID
public void clearSoftLock(SoftLock softLock)
clearSoftLock
in interface SoftLockManager
softLock
- the lock to clear
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |