|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ojb.odmg.locking.AbstractLockStrategy
org.apache.ojb.odmg.locking.ReadCommittedStrategy
public class ReadCommittedStrategy
The implementation of the Commited Reads Locking stra ReadCommitted - Reads and Writes require locks. Locks are acquired for reading and modifying the database. Locks are released after reading but locks on modified objects are held until EOT. Allows: Non-Repeatable Reads Phantom Readstegy.
| Field Summary |
|---|
| Fields inherited from class org.apache.ojb.odmg.locking.AbstractLockStrategy |
|---|
DEFAULT_LOCK_TIMEOUT |
| Constructor Summary | |
|---|---|
ReadCommittedStrategy()
|
|
| Method Summary | |
|---|---|
boolean |
checkRead(TransactionImpl tx,
Object obj)
checks whether the specified Object obj is read-locked by Transaction tx. |
boolean |
checkWrite(TransactionImpl tx,
Object obj)
checks whether the specified Object obj is write-locked by Transaction tx. |
boolean |
readLock(TransactionImpl tx,
Object obj)
acquire a read lock on Object obj for Transaction tx. |
boolean |
releaseLock(TransactionImpl tx,
Object obj)
release a lock on Object obj for Transaction tx. |
boolean |
upgradeLock(TransactionImpl tx,
Object obj)
acquire a lock upgrade (from read to write) lock on Object obj for Transaction tx. |
boolean |
writeLock(TransactionImpl tx,
Object obj)
acquire a write lock on Object obj for Transaction tx. |
| Methods inherited from class org.apache.ojb.odmg.locking.AbstractLockStrategy |
|---|
addReader, getReaders, getWriter, hasReadLock, removeReader, removeWriter, setWriter, upgradeLock |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReadCommittedStrategy()
| Method Detail |
|---|
public boolean readLock(TransactionImpl tx,
Object obj)
tx - the transaction requesting the lockobj - the Object to be locked
public boolean writeLock(TransactionImpl tx,
Object obj)
tx - the transaction requesting the lockobj - the Object to be locked
public boolean upgradeLock(TransactionImpl tx,
Object obj)
tx - the transaction requesting the lockobj - the Object to be locked
public boolean releaseLock(TransactionImpl tx,
Object obj)
tx - the transaction releasing the lockobj - the Object to be unlocked
public boolean checkRead(TransactionImpl tx,
Object obj)
tx - the transactionobj - the Object to be checked
public boolean checkWrite(TransactionImpl tx,
Object obj)
tx - the transactionobj - the Object to be checked
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||