org.testng.internal.thread
Class PooledExecutorAdapter

java.lang.Object
  extended by java.util.concurrent.AbstractExecutorService
      extended by java.util.concurrent.ThreadPoolExecutor
          extended by org.testng.internal.thread.PooledExecutorAdapter
All Implemented Interfaces:
java.util.concurrent.Executor, java.util.concurrent.ExecutorService, IPooledExecutor

public class PooledExecutorAdapter
extends java.util.concurrent.ThreadPoolExecutor
implements IPooledExecutor

An IPooledExecutor implementation based on JDK1.5 native support.

Author:
Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy
 
Constructor Summary
PooledExecutorAdapter(int noThreads)
           
 
Method Summary
 void awaitTermination(long timeout)
           
 void execute(java.lang.Runnable command)
           
 
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow, terminated
 
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.testng.internal.thread.IPooledExecutor
isTerminated, shutdown
 

Constructor Detail

PooledExecutorAdapter

public PooledExecutorAdapter(int noThreads)
Method Detail

execute

public void execute(java.lang.Runnable command)
Specified by:
execute in interface java.util.concurrent.Executor
Specified by:
execute in interface IPooledExecutor
Overrides:
execute in class java.util.concurrent.ThreadPoolExecutor

awaitTermination

public void awaitTermination(long timeout)
                      throws java.lang.InterruptedException
Specified by:
awaitTermination in interface IPooledExecutor
Throws:
java.lang.InterruptedException


Copyright © 2010. All Rights Reserved.