org.apache.ojb.otm.lock
Class ObjectLock.LockEntry

java.lang.Object
  extended by org.apache.ojb.otm.lock.ObjectLock.LockEntry
Enclosing class:
ObjectLock

private class ObjectLock.LockEntry
extends Object


Field Summary
 ArrayList _listeners
           
 Transaction _tx
           
 
Constructor Summary
ObjectLock.LockEntry(Transaction tx)
           
 
Method Summary
 void addListener(LockListener listener)
          Add a listener to the list of LockListeners.
 ArrayList getListeners()
          Returns the LockListeners for this entry.
 Transaction getTx()
          Returns the transaction held by this LockEntry.
 void release()
           
 void writeLock()
          Make this lock a writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_tx

public Transaction _tx

_listeners

public ArrayList _listeners
Constructor Detail

ObjectLock.LockEntry

public ObjectLock.LockEntry(Transaction tx)
Method Detail

getListeners

public ArrayList getListeners()
Returns the LockListeners for this entry.

Returns:
ArrayList of LockListeners

getTx

public Transaction getTx()
Returns the transaction held by this LockEntry.

Returns:
Transaction

addListener

public void addListener(LockListener listener)
Add a listener to the list of LockListeners. LockListener is notified, when this LockEntry is released.

Parameters:
listener - the LockListener

writeLock

public void writeLock()
               throws LockingException
Make this lock a writer. If a writer is already present, the call will block until the lock is released by the writer.

Throws:
LockingException

release

public void release()


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