org.testng.internal.thread.DefaultThreadPoolExecutorFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of testng Show documentation
Show all versions of testng Show documentation
Testing framework for Java
package org.testng.internal.thread;
import java.util.Comparator;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.TimeUnit;
import org.testng.IDynamicGraph;
import org.testng.thread.IExecutorFactory;
import org.testng.ISuite;
import org.testng.ITestNGMethod;
import org.testng.thread.ITestNGThreadPoolExecutor;
import org.testng.internal.thread.graph.GraphThreadPoolExecutor;
import org.testng.thread.IThreadWorkerFactory;
public class DefaultThreadPoolExecutorFactory implements IExecutorFactory {
@Override
public ITestNGThreadPoolExecutor newSuiteExecutor(String name, IDynamicGraph graph,
IThreadWorkerFactory factory, int corePoolSize, int maximumPoolSize,
long keepAliveTime, TimeUnit unit, BlockingQueue workQueue,
Comparator comparator) {
return new GraphThreadPoolExecutor<>(name, graph, factory, corePoolSize, maximumPoolSize,
keepAliveTime, unit, workQueue, comparator);
}
@Override
public ITestNGThreadPoolExecutor newTestMethodExecutor(String name,
IDynamicGraph graph,
IThreadWorkerFactory factory, int corePoolSize, int maximumPoolSize,
long keepAliveTime, TimeUnit unit, BlockingQueue workQueue,
Comparator comparator) {
return new GraphThreadPoolExecutor<>(name, graph, factory, corePoolSize, maximumPoolSize,
keepAliveTime, unit, workQueue, comparator);
}
}