com.flat502.rox.utils
Class SimpleLock

java.lang.Object
  extended by com.flat502.rox.utils.SimpleLock

public class SimpleLock
extends java.lang.Object

An exclusive re-entrant lock.

This lock implementation provides exactly the same functionality as Java's synchronization block construct except that it isn't block-oriented.

A thread may acquire this lock multiple times and must release it once for each acquisition.


Constructor Summary
SimpleLock()
           
 
Method Summary
 void lock()
           
 void unlock()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleLock

public SimpleLock()
Method Detail

lock

public void lock()

unlock

public void unlock()
            throws java.lang.IllegalMonitorStateException
Throws:
java.lang.IllegalMonitorStateException