org.apache.ojb.odmg.locking
Class LockManagerOdmgImpl

java.lang.Object
  extended by org.apache.ojb.odmg.locking.LockManagerOdmgImpl
All Implemented Interfaces:
LockManager

public class LockManagerOdmgImpl
extends Object
implements LockManager

The odmg lock manager implementation of the LockManager interface. This class using the OJB kernel locking api LockManager to manage object locking.

Version:
$Id: LockManagerOdmgImpl.java,v 1.1 2007-08-24 22:17:28 ewestfal Exp $
Author:
Armin Waibel

Constructor Summary
LockManagerOdmgImpl(LockManager lm)
           
 
Method Summary
 boolean checkRead(TransactionImpl tx, Identity oid, Object obj)
          checks if there is a readlock for transaction tx on object obj.
 boolean checkRead(TransactionImpl tx, Object obj)
          checks if there is a readlock for transaction tx on object obj.
 boolean checkWrite(TransactionImpl tx, Identity oid, Object obj)
          checks if there is a writelock for transaction tx on object obj.
 boolean checkWrite(TransactionImpl tx, Object obj)
          checks if there is a writelock for transaction tx on object obj.
 boolean readLock(TransactionImpl tx, Identity oid, Object obj)
          aquires a readlock for transaction tx on object obj.
 boolean readLock(TransactionImpl tx, Object obj)
          aquires a readlock for transaction tx on object obj.
 boolean releaseLock(TransactionImpl tx, Identity oid, Object obj)
          releases a lock for transaction tx on object obj.
 boolean releaseLock(TransactionImpl tx, Object obj)
          releases a lock for transaction tx on object obj.
 boolean upgradeLock(TransactionImpl tx, Identity oid, Object obj)
          upgrades readlock for transaction tx on object obj to a writelock.
 boolean upgradeLock(TransactionImpl tx, Object obj)
          upgrades readlock for transaction tx on object obj to a writelock.
 boolean writeLock(TransactionImpl tx, Identity oid, Object obj)
          aquires a writelock for transaction tx on object obj.
 boolean writeLock(TransactionImpl tx, Object obj)
          aquires a writelock for transaction tx on object obj.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LockManagerOdmgImpl

public LockManagerOdmgImpl(LockManager lm)
Method Detail

readLock

public boolean readLock(TransactionImpl tx,
                        Object obj)
Description copied from interface: LockManager
aquires a readlock for transaction tx on object obj. Returns true if successful, else false.

Specified by:
readLock in interface LockManager

readLock

public boolean readLock(TransactionImpl tx,
                        Identity oid,
                        Object obj)
Description copied from interface: LockManager
aquires a readlock for transaction tx on object obj. Returns true if successful, else false.

Specified by:
readLock in interface LockManager

writeLock

public boolean writeLock(TransactionImpl tx,
                         Object obj)
Description copied from interface: LockManager
aquires a writelock for transaction tx on object obj. Returns true if successful, else false.

Specified by:
writeLock in interface LockManager

writeLock

public boolean writeLock(TransactionImpl tx,
                         Identity oid,
                         Object obj)
Description copied from interface: LockManager
aquires a writelock for transaction tx on object obj. Returns true if successful, else false.

Specified by:
writeLock in interface LockManager

upgradeLock

public boolean upgradeLock(TransactionImpl tx,
                           Object obj)
Description copied from interface: LockManager
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.

Specified by:
upgradeLock in interface LockManager

upgradeLock

public boolean upgradeLock(TransactionImpl tx,
                           Identity oid,
                           Object obj)
Description copied from interface: LockManager
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.

Specified by:
upgradeLock in interface LockManager

releaseLock

public boolean releaseLock(TransactionImpl tx,
                           Object obj)
Description copied from interface: LockManager
releases a lock for transaction tx on object obj. Returns true if successful, else false.

Specified by:
releaseLock in interface LockManager

releaseLock

public boolean releaseLock(TransactionImpl tx,
                           Identity oid,
                           Object obj)
Description copied from interface: LockManager
releases a lock for transaction tx on object obj. Returns true if successful, else false.

Specified by:
releaseLock in interface LockManager

checkRead

public boolean checkRead(TransactionImpl tx,
                         Object obj)
Description copied from interface: LockManager
checks if there is a readlock for transaction tx on object obj. Returns true if so, else false.

Specified by:
checkRead in interface LockManager

checkRead

public boolean checkRead(TransactionImpl tx,
                         Identity oid,
                         Object obj)
Description copied from interface: LockManager
checks if there is a readlock for transaction tx on object obj. Returns true if so, else false.

Specified by:
checkRead in interface LockManager

checkWrite

public boolean checkWrite(TransactionImpl tx,
                          Object obj)
Description copied from interface: LockManager
checks if there is a writelock for transaction tx on object obj. Returns true if so, else false.

Specified by:
checkWrite in interface LockManager

checkWrite

public boolean checkWrite(TransactionImpl tx,
                          Identity oid,
                          Object obj)
Description copied from interface: LockManager
checks if there is a writelock for transaction tx on object obj. Returns true if so, else false.

Specified by:
checkWrite in interface LockManager


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.