| java.lang.Object org.apache.ojb.odmg.locking.AbstractLockStrategy org.apache.ojb.odmg.locking.ReadUncommittedStrategy
ReadUncommittedStrategy | public class ReadUncommittedStrategy extends AbstractLockStrategy (Code) | | The implementation of the Uncommited Reads Locking strategy.
This strategy is the loosest of them all. It says
you shouldn't need to get any Read locks whatsoever,
but since it will probably try to get them, it will
always give it to them.
Locks are obtained on modifications to the database and held until end of
transaction (EOT). Reading from the database does not involve any locking.
Allows:
Dirty Reads
Non-Repeatable Reads
Phantom Reads
author: Thomas Mahler & David Dixon-Peugh |
checkRead | public boolean checkRead(TransactionImpl tx, Object obj)(Code) | | checks whether the specified Object obj is read-locked by Transaction tx.
Parameters: tx - the transaction Parameters: obj - the Object to be checked true if lock exists, else false |
checkWrite | public boolean checkWrite(TransactionImpl tx, Object obj)(Code) | | checks whether the specified Object obj is write-locked by Transaction tx.
Parameters: tx - the transaction Parameters: obj - the Object to be checked true if lock exists, else false |
readLock | public boolean readLock(TransactionImpl tx, Object obj)(Code) | | acquire a read lock on Object obj for Transaction tx.
Parameters: tx - the transaction requesting the lock Parameters: obj - the Object to be locked true if successful, else falseWhen we read Uncommitted, we don't care about Reader locks |
releaseLock | public boolean releaseLock(TransactionImpl tx, Object obj)(Code) | | release a lock on Object obj for Transaction tx.
Parameters: tx - the transaction releasing the lock Parameters: obj - the Object to be unlocked true if successful, else false |
upgradeLock | public boolean upgradeLock(TransactionImpl tx, Object obj)(Code) | | acquire a lock upgrade (from read to write) lock on Object obj for Transaction tx.
Parameters: tx - the transaction requesting the lock Parameters: obj - the Object to be locked true if successful, else false |
writeLock | public boolean writeLock(TransactionImpl tx, Object obj)(Code) | | acquire a write lock on Object obj for Transaction tx.
Parameters: tx - the transaction requesting the lock Parameters: obj - the Object to be locked true if successful, else false |
Fields inherited from org.apache.ojb.odmg.locking.AbstractLockStrategy | public static long DEFAULT_LOCK_TIMEOUT(Code)(Java Doc)
|
|
|