| java.lang.Object com.caucho.db.store.Lock
Lock | final public class Lock (Code) | | Locking for tables/etc.
|
getId | public String getId()(Code) | | Returns the lock identifier.
|
lockReadAndWrite | void lockReadAndWrite(Transaction xa, long timeout) throws SQLException(Code) | | Tries to get a write lock.
Parameters: timeout - how long to wait for a timeout |
lockReadAndWriteNoWait | public boolean lockReadAndWriteNoWait() throws SQLException(Code) | | Tries to get a write lock, but does not wait if other threads are
reading or writing. insert() uses this call to avoid blocking when
allocating a new row.
true if the write was successful |
lockWrite | void lockWrite(Transaction xa, long timeout) throws SQLException(Code) | | Tries to get a write lock when already have a read lock.
Parameters: timeout - how long to wait for a timeout |
unlockReadAndWrite | void unlockReadAndWrite() throws SQLException(Code) | | Clears a write lock.
|
waitForCommit | void waitForCommit()(Code) | | Waits until all the writers drain before committing, see Block.commit()
|
|
|