org.jogre.common.util
Class ReadWriteLock

java.lang.Object
  extended byorg.jogre.common.util.ReadWriteLock

public class ReadWriteLock
extends Object

Class for creating a read write designed for objects sitting on the server.

Version:
Alpha 0.2.3
Author:
Bob Marks

Constructor Summary
ReadWriteLock(Class lockedClass)
          Constructor.
 
Method Summary
 void getReadLock()
          A read lock can be issued if there is no currently issued write lock and there is no thread(s) currently waiting for the write lock.
 void getWriteLock()
          A write lock can be issued if there is no currently issued read or write lock.
 void release()
          Used for releasing locks.
 void setVerbose(boolean value)
          Turn locking verbose on / off.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadWriteLock

public ReadWriteLock(Class lockedClass)
Constructor.

Method Detail

getReadLock

public void getReadLock()
A read lock can be issued if there is no currently issued write lock and there is no thread(s) currently waiting for the write lock.


getWriteLock

public void getWriteLock()
A write lock can be issued if there is no currently issued read or write lock.


setVerbose

public void setVerbose(boolean value)
Turn locking verbose on / off.

Parameters:
value -

release

public void release()
Used for releasing locks.