jade.util
Class RWLock

java.lang.Object
  |
  +--jade.util.RWLock
Direct Known Subclasses:
SynchList

public class RWLock
extends java.lang.Object

This class provides support for synchronizing threads acting on a generic resource in such a way that - If a thread is writing the resource no other thread can act on it in any way - Several threads can read the resource at the same time - If one or more threads are reading the resource no thread can write it

Author:
Giovanni Caire - TILab

Constructor Summary
RWLock()
           
 
Method Summary
protected  void onWriteEnd()
           
protected  void onWriteStart()
           
 void readLock()
           
 void readUnlock()
           
 void writeLock()
           
 void writeUnlock()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RWLock

public RWLock()
Method Detail

writeLock

public void writeLock()

writeUnlock

public void writeUnlock()

readLock

public void readLock()

readUnlock

public void readUnlock()

onWriteStart

protected void onWriteStart()

onWriteEnd

protected void onWriteEnd()