All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.testng.internal.thread.DefaultThreadPoolExecutorFactory Maven / Gradle / Ivy

There is a newer version: 7.10.1
Show newest version
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);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy