org.apache.ojb.odmg.locking
Interface LockStrategy

All Known Implementing Classes:
AbstractLockStrategy, LockStrategyFactory.NOOPStrategy, ReadCommittedStrategy, ReadUncommittedStrategy, RepeatableReadStrategy, SerializableStrategy

Deprecated.

public interface LockStrategy

this interface defines method that a Locking Strategy must implement according to the transaction isolation level it represents.


Method Summary
 boolean checkRead(TransactionImpl tx, Object obj)
          Deprecated. checks whether the specified Object obj is read-locked by Transaction tx.
 boolean checkWrite(TransactionImpl tx, Object obj)
          Deprecated. checks whether the specified Object obj is write-locked by Transaction tx.
 boolean readLock(TransactionImpl tx, Object obj)
          Deprecated. acquire a read lock on Object obj for Transaction tx.
 boolean releaseLock(TransactionImpl tx, Object obj)
          Deprecated. release a lock on Object obj for Transaction tx.
 boolean upgradeLock(TransactionImpl tx, Object obj)
          Deprecated. acquire a lock upgrade (from read to write) lock on Object obj for Transaction tx.
 boolean writeLock(TransactionImpl tx, Object obj)
          Deprecated. acquire a write lock on Object obj for Transaction tx.
 

Method Detail

readLock

boolean readLock(TransactionImpl tx,
                 Object obj)
Deprecated. 
acquire a read lock on Object obj for Transaction tx.

Parameters:
tx - the transaction requesting the lock
obj - the Object to be locked
Returns:
true if successful, else false

writeLock

boolean writeLock(TransactionImpl tx,
                  Object obj)
Deprecated. 
acquire a write lock on Object obj for Transaction tx.

Parameters:
tx - the transaction requesting the lock
obj - the Object to be locked
Returns:
true if successful, else false

upgradeLock

boolean upgradeLock(TransactionImpl tx,
                    Object obj)
Deprecated. 
acquire a lock upgrade (from read to write) lock on Object obj for Transaction tx.

Parameters:
tx - the transaction requesting the lock
obj - the Object to be locked
Returns:
true if successful, else false

releaseLock

boolean releaseLock(TransactionImpl tx,
                    Object obj)
Deprecated. 
release a lock on Object obj for Transaction tx.

Parameters:
tx - the transaction releasing the lock
obj - the Object to be unlocked
Returns:
true if successful, else false

checkRead

boolean checkRead(TransactionImpl tx,
                  Object obj)
Deprecated. 
checks whether the specified Object obj is read-locked by Transaction tx.

Parameters:
tx - the transaction
obj - the Object to be checked
Returns:
true if lock exists, else false

checkWrite

boolean checkWrite(TransactionImpl tx,
                   Object obj)
Deprecated. 
checks whether the specified Object obj is write-locked by Transaction tx.

Parameters:
tx - the transaction
obj - the Object to be checked
Returns:
true if lock exists, else false


Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.