jade.util
Class SynchList

java.lang.Object
  |
  +--jade.util.RWLock
        |
        +--jade.util.SynchList

public class SynchList
extends RWLock

Implementation of a list of objects providing methods to synchronize threads acting on the list in such a way to prevent concurrent modifications (addition/remotion of elements) and concurrent scanning/modification. Concurrent scannings are allowed instead.

Author:
Giovanni Caire - TILab

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

Constructor Detail

SynchList

public SynchList()
Method Detail

startModifying

public List startModifying()

stopModifying

public void stopModifying()

startScanning

public List startScanning()

stopScanning

public void stopScanning()

onWriteStart

protected void onWriteStart()
Overrides:
onWriteStart in class RWLock

onWriteEnd

protected void onWriteEnd()
Overrides:
onWriteEnd in class RWLock