| org.apache.ojb.odmg.locking.LockStrategy
All known Subclasses: org.apache.ojb.odmg.locking.AbstractLockStrategy,
LockStrategy | public interface LockStrategy (Code) | | this interface defines method that a Locking Strategy must implement
according to the transaction isolation level it represents.
|
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 false |
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 |
|
|