org.apache.ojb.otm.lock
Class ObjectLock
java.lang.Object
org.apache.ojb.otm.lock.ObjectLock
public class ObjectLock
- extends Object
Represents the locks held for an object. The basic assertion is that at any given point
in time, there can be multiple readers, but just one writer.
- Author:
- Raghu Rajah
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_oid
private Identity _oid
_writer
private ObjectLock.LockEntry _writer
_readers
private HashMap _readers
ObjectLock
public ObjectLock(Identity oid)
getTargetIdentity
public Identity getTargetIdentity()
getWriter
public Transaction getWriter()
isReader
public boolean isReader(Transaction tx)
doesReaderExists
public boolean doesReaderExists()
getReaders
public Collection getReaders()
readLock
public void readLock(Transaction tx)
writeLock
public void writeLock(Transaction tx)
throws LockingException
- Throws:
LockingException
releaseLock
public void releaseLock(Transaction tx)
waitForTx
public void waitForTx(Transaction tx)
throws LockingException
- Throws:
LockingException
isFree
public boolean isFree()
Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.