| org.apache.ojb.odmg.locking.LockManager
All known Subclasses: org.apache.ojb.odmg.locking.LockManagerOdmgImpl, org.apache.ojb.odmg.locking.LockManagerDefaultImpl,
LockManager | public interface LockManager (Code) | | This interface declares the functionality of the OJB internal Locking mechanism.
A default implementaion LockManagerDefaultImpl is provided. This implementaion
keeps distributed locks in the database. The locking mechanisms thus involves a
lot of database lookups and writes. For some environments this solution may not
be adequate. OJB allows to provide user defined implementations of this interface.
To activate a user defined LockManagerDefaultImpl it must be configured in the OJB.properties file.
author: thma |
Method Summary | |
abstract public boolean | checkRead(TransactionImpl tx, Object obj) checks if there is a readlock for transaction tx on object obj. | abstract public boolean | checkRead(TransactionImpl tx, Identity oid, Object obj) checks if there is a readlock for transaction tx on object obj. | abstract public boolean | checkWrite(TransactionImpl tx, Object obj) checks if there is a writelock for transaction tx on object obj. | abstract public boolean | checkWrite(TransactionImpl tx, Identity oid, Object obj) checks if there is a writelock for transaction tx on object obj. | abstract public boolean | readLock(TransactionImpl tx, Object obj) aquires a readlock for transaction tx on object obj. | abstract public boolean | readLock(TransactionImpl tx, Identity oid, Object obj) aquires a readlock for transaction tx on object obj. | abstract public boolean | releaseLock(TransactionImpl tx, Object obj) releases a lock for transaction tx on object obj. | abstract public boolean | releaseLock(TransactionImpl tx, Identity oid, Object obj) releases a lock for transaction tx on object obj. | abstract public boolean | upgradeLock(TransactionImpl tx, Object obj) upgrades readlock for transaction tx on object obj to a writelock. | abstract public boolean | upgradeLock(TransactionImpl tx, Identity oid, Object obj) upgrades readlock for transaction tx on object obj to a writelock. | abstract public boolean | writeLock(TransactionImpl tx, Object obj) aquires a writelock for transaction tx on object obj. | abstract public boolean | writeLock(TransactionImpl tx, Identity oid, Object obj) aquires a writelock for transaction tx on object obj. |
checkRead | abstract public boolean checkRead(TransactionImpl tx, Object obj)(Code) | | checks if there is a readlock for transaction tx on object obj.
Returns true if so, else false.
|
checkRead | abstract public boolean checkRead(TransactionImpl tx, Identity oid, Object obj)(Code) | | checks if there is a readlock for transaction tx on object obj.
Returns true if so, else false.
|
checkWrite | abstract public boolean checkWrite(TransactionImpl tx, Object obj)(Code) | | checks if there is a writelock for transaction tx on object obj.
Returns true if so, else false.
|
checkWrite | abstract public boolean checkWrite(TransactionImpl tx, Identity oid, Object obj)(Code) | | checks if there is a writelock for transaction tx on object obj.
Returns true if so, else false.
|
readLock | abstract public boolean readLock(TransactionImpl tx, Object obj)(Code) | | aquires a readlock for transaction tx on object obj.
Returns true if successful, else false.
|
readLock | abstract public boolean readLock(TransactionImpl tx, Identity oid, Object obj)(Code) | | aquires a readlock for transaction tx on object obj.
Returns true if successful, else false.
|
releaseLock | abstract public boolean releaseLock(TransactionImpl tx, Object obj)(Code) | | releases a lock for transaction tx on object obj.
Returns true if successful, else false.
|
releaseLock | abstract public boolean releaseLock(TransactionImpl tx, Identity oid, Object obj)(Code) | | releases a lock for transaction tx on object obj.
Returns true if successful, else false.
|
upgradeLock | abstract public boolean upgradeLock(TransactionImpl tx, Object obj)(Code) | | upgrades readlock for transaction tx on object obj to a writelock.
If no readlock existed a writelock is acquired anyway.
Returns true if successful, else false.
|
upgradeLock | abstract public boolean upgradeLock(TransactionImpl tx, Identity oid, Object obj)(Code) | | upgrades readlock for transaction tx on object obj to a writelock.
If no readlock existed a writelock is acquired anyway.
Returns true if successful, else false.
|
writeLock | abstract public boolean writeLock(TransactionImpl tx, Object obj)(Code) | | aquires a writelock for transaction tx on object obj.
Returns true if successful, else false.
|
writeLock | abstract public boolean writeLock(TransactionImpl tx, Identity oid, Object obj)(Code) | | aquires a writelock for transaction tx on object obj.
Returns true if successful, else false.
|
|
|