public abstract class AbstractSoftLockManager extends Object implements SoftLockManager
| Constructor and Description |
|---|
AbstractSoftLockManager(String cacheName,
SoftLockFactory lockFactory)
Create an abstract soft lock manager for the given cache name and soft lock factory.
|
| Modifier and Type | Method and Description |
|---|---|
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,
boolean pinned)
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.
|
public AbstractSoftLockManager(String cacheName, SoftLockFactory lockFactory)
cacheName - name of the cachelockFactory - factory of managed locksprotected abstract ConcurrentMap<SoftLockID,SoftLock> getAllLocks()
protected abstract ConcurrentMap<SoftLockID,Boolean> getNewKeyLocks()
public SoftLockID createSoftLockID(TransactionID transactionID, Object key, Element newElement, Element oldElement, boolean pinned)
createSoftLockID in interface SoftLockManagertransactionID - 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 Elementpinned - true if the actual Element is pinnedpublic SoftLock findSoftLockById(SoftLockID softLockId)
findSoftLockById in interface SoftLockManagersoftLockId - the soft lock's IDpublic Set<Object> getKeysInvisibleInContext(LocalTransactionContext currentTransactionContext, Store underlyingStore)
getKeysInvisibleInContext in interface SoftLockManagercurrentTransactionContext - the transaction contextpublic Set<SoftLock> collectAllSoftLocksForTransactionID(TransactionID transactionID)
collectAllSoftLocksForTransactionID in interface SoftLockManagertransactionID - the transaction IDpublic void clearSoftLock(SoftLock softLock)
clearSoftLock in interface SoftLockManagersoftLock - the lock to clearCopyright © 2003-2014 Terracotta, Inc.. All Rights Reserved.