org.apache.ojb.otm.lock
Class ObjectLock
java.lang.Object
org.apache.ojb.otm.lock.ObjectLock
- public class ObjectLock
- extends java.lang.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 |
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 java.util.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
Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14