|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.testng.internal.thread.ThreadUtil
public class ThreadUtil
A helper class to interface TestNG concurrency usage.
| Nested Class Summary | |
|---|---|
static class |
ThreadUtil.ThreadFactoryImpl
|
| Constructor Summary | |
|---|---|
ThreadUtil()
|
|
| Method Summary | |
|---|---|
static IAtomicInteger |
createAtomicInteger(int initialValue)
|
static IExecutor |
createExecutor(int threadCount,
java.lang.String threadFactoryName)
|
static java.lang.String |
currentThreadInfo()
Returns a readable name of the current executing thread. |
static void |
execute(java.util.List<? extends java.lang.Runnable> tasks,
int threadPoolSize,
long timeout,
boolean triggerAtOnce)
Parallel execution of the tasks. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ThreadUtil()
| Method Detail |
|---|
public static final void execute(java.util.List<? extends java.lang.Runnable> tasks,
int threadPoolSize,
long timeout,
boolean triggerAtOnce)
tasks. The startup is synchronized so this method
emulates a load test.
tasks - the list of tasks to be runthreadPoolSize - the size of the parallel threads to be used to execute the taskstimeout - CURRENTLY NOT USED (a maximum timeout to wait for tasks finalization)triggerAtOnce - true if the parallel execution of tasks should be trigger at oncepublic static final java.lang.String currentThreadInfo()
public static final IExecutor createExecutor(int threadCount,
java.lang.String threadFactoryName)
public static final IAtomicInteger createAtomicInteger(int initialValue)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||