|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ojb.odmg.locking.AbstractLockStrategy
The base class of all LockingStrategies. It provides the basic infrastructure to read and write locks to the persistent storage.
Field Summary | |
static long |
DEFAULT_LOCK_TIMEOUT
the timeout for lock entries |
Constructor Summary | |
AbstractLockStrategy()
|
Method Summary | |
protected boolean |
addReader(TransactionImpl tx,
java.lang.Object obj)
Add a reader lock entry for transaction tx on object obj to the persistent storage. |
protected java.util.Collection |
getReaders(java.lang.Object obj)
returns a collection of Reader LockEntries for object obj. |
protected LockEntry |
getWriter(java.lang.Object obj)
returns the LockEntry for the Writer of object obj. |
protected boolean |
hasReadLock(TransactionImpl tx,
java.lang.Object obj)
check if there is a reader lock entry for transaction tx on object obj in the persistent storage. |
protected void |
removeReader(TransactionImpl tx,
java.lang.Object obj)
remove a reader lock entry for transaction tx on object obj from the persistent storage. |
protected void |
removeWriter(LockEntry writer)
remove a writer lock entry for transaction tx on object obj from the persistent storage. |
protected boolean |
setWriter(TransactionImpl tx,
java.lang.Object obj)
generate a writer lock entry for transaction tx on object obj and write it to the persistent storage. |
protected boolean |
upgradeLock(LockEntry reader)
upgrade a reader lock entry for transaction tx on object obj and write it to the persistent storage. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface ojb.odmg.locking.LockStrategy |
checkRead, checkWrite, readLock, releaseLock, upgradeLock, writeLock |
Field Detail |
public static long DEFAULT_LOCK_TIMEOUT
Constructor Detail |
public AbstractLockStrategy()
Method Detail |
protected LockEntry getWriter(java.lang.Object obj)
protected java.util.Collection getReaders(java.lang.Object obj)
protected boolean addReader(TransactionImpl tx, java.lang.Object obj)
protected void removeReader(TransactionImpl tx, java.lang.Object obj)
protected void removeWriter(LockEntry writer)
protected boolean upgradeLock(LockEntry reader)
protected boolean setWriter(TransactionImpl tx, java.lang.Object obj)
protected boolean hasReadLock(TransactionImpl tx, java.lang.Object obj)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |