Package org.testng.internal.thread.graph
Class GraphThreadPoolExecutor<T>
java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
org.testng.internal.thread.graph.GraphThreadPoolExecutor<T>
- All Implemented Interfaces:
Executor,ExecutorService,ITestNGThreadPoolExecutor
public class GraphThreadPoolExecutor<T>
extends ThreadPoolExecutor
implements ITestNGThreadPoolExecutor
An Executor that launches tasks per batches. It takes a
DynamicGraph of tasks to be run
and a IThreadWorkerFactory to initialize/create Runnable wrappers around those
tasks-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy -
Constructor Summary
ConstructorsConstructorDescriptionGraphThreadPoolExecutor(String name, IDynamicGraph<T> graph, IThreadWorkerFactory<T> factory, int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, Comparator<T> comparator) -
Method Summary
Modifier and TypeMethodDescriptionvoidafterExecute(Runnable r, Throwable t) voidrun()Helps kick start the execution and is the point of entry for execution.Methods inherited from class java.util.concurrent.ThreadPoolExecutor
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, execute, 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, toStringMethods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submitMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submit
-
Constructor Details
-
GraphThreadPoolExecutor
public GraphThreadPoolExecutor(String name, IDynamicGraph<T> graph, IThreadWorkerFactory<T> factory, int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, Comparator<T> comparator)
-
-
Method Details
-
run
public void run()Description copied from interface:ITestNGThreadPoolExecutorHelps kick start the execution and is the point of entry for execution.- Specified by:
runin interfaceITestNGThreadPoolExecutor
-
afterExecute
- Overrides:
afterExecutein classThreadPoolExecutor
-