de.uka.ipd.sdq.ByCounter.utils
Class Barrier

java.lang.Object
  extended by de.uka.ipd.sdq.ByCounter.utils.Barrier

public final class Barrier
extends java.lang.Object

Barrier helper object for encapsulated synchronization. Used in the GUI (classes ByLoaderGUI and ByClassFileTransformer - see Javadocs).

Since:
0.9
Version:
1.2
Author:
Martin Krogmann, Michael Kuperberg

Constructor Summary
Barrier()
           
 
Method Summary
 void block()
          This blocks the current thread until release() is called.
 void release()
          This unblocks the thread that was blocked with block().
 void releaseAll()
          This unblocks all threads that were blocked with block().
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Barrier

public Barrier()
Method Detail

block

public void block()
           throws java.lang.InterruptedException
This blocks the current thread until release() is called.

Throws:
java.lang.InterruptedException

release

public void release()
This unblocks the thread that was blocked with block().


releaseAll

public void releaseAll()
This unblocks all threads that were blocked with block().