org.apache.avalon.excalibur.concurrent
クラス ThreadBarrier

java.lang.Object
  |
  +--org.apache.avalon.excalibur.concurrent.ThreadBarrier

public class ThreadBarrier
extends java.lang.Object

A thread barrier blocks all threads hitting it until a pre-defined number of threads arrive at the barrier. This is useful for implementing release consistent concurrency where you don't want to take the performance penalty of providing mutual exclusion to shared resources

導入されたバージョン:
4.0
バージョン:
CVS $Revision: 1.3 $ $Date: 2001/12/11 09:53:28 $
作成者:
Karthik Rangaraju

コンストラクタの概要
ThreadBarrier(int count)
          Initializes a thread barrier object with a given thread count
 
メソッドの概要
 void barrierSynchronize()
          This method blocks all threads calling it until the threshold number of threads have called it.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

ThreadBarrier

public ThreadBarrier(int count)
Initializes a thread barrier object with a given thread count
パラメータ:
pCount - is the number of threads that need to block on barrierSynchronize() before they will be allowed to pass through
関連項目:
barrierSynchronize()
メソッドの詳細

barrierSynchronize

public void barrierSynchronize()
                        throws java.lang.InterruptedException
This method blocks all threads calling it until the threshold number of threads have called it. It then releases all threads blocked by it
例外:
java.lang.InterruptedException - if any thread blocked during the call is interrupted


"Copyright ? 2001 Apache Jakarta Project. All Rights Reserved."