org.testng.internal.thread
Class CountDownAdapter

java.lang.Object
  extended by org.testng.internal.thread.CountDownAdapter
All Implemented Interfaces:
ICountDown

public class CountDownAdapter
extends java.lang.Object
implements ICountDown

ICountDown adapter using the features in JDK 1.5, e.g. CountDownLatch.

Version:
$Revision$
Author:
Field Summary
protected  java.util.concurrent.CountDownLatch m_doneLatch
           
 
Constructor Summary
CountDownAdapter(int count)
           
 
Method Summary
 void await()
           
 boolean await(long timeout)
           
 void countDown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_doneLatch

protected java.util.concurrent.CountDownLatch m_doneLatch
Constructor Detail

CountDownAdapter

public CountDownAdapter(int count)
Method Detail

await

public void await()
           throws java.lang.InterruptedException
Specified by:
await in interface ICountDown
Throws:
java.lang.InterruptedException

await

public boolean await(long timeout)
              throws java.lang.InterruptedException
Specified by:
await in interface ICountDown
Throws:
java.lang.InterruptedException

countDown

public void countDown()
Specified by:
countDown in interface ICountDown


Copyright © 2010. All Rights Reserved.