com.mwc.sqld.db
Class ReadWriteLock

java.lang.Object
  |
  +--com.mwc.sqld.db.ReadWriteLock

public class ReadWriteLock
extends java.lang.Object

Used to synchronize access to the database.


Constructor Summary
ReadWriteLock()
          Constructor dose the init.
 
Method Summary
 void readLock()
          Get a lock for reading.
 int readUnlock()
          Give up a lock for reading.
 void writeLock()
          Get a lock for writing.
 int writeUnlock()
          Give up a lock for writing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadWriteLock

public ReadWriteLock()
Constructor dose the init.
Method Detail

readLock

public void readLock()
Get a lock for reading.

writeLock

public void writeLock()
Get a lock for writing.

readUnlock

public int readUnlock()
Give up a lock for reading.
Returns:
-1 on error, else zero.

writeUnlock

public int writeUnlock()
Give up a lock for writing.
Returns:
-1 on error, else zero.