Package org.awaitility.core
Class InternalExecutorServiceFactory
- java.lang.Object
-
- org.awaitility.core.InternalExecutorServiceFactory
-
public class InternalExecutorServiceFactory extends java.lang.ObjectPlease don't use this class directly, it's for internal purposes only and will be moved/renamed without notice!
-
-
Constructor Summary
Constructors Constructor Description InternalExecutorServiceFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.concurrent.ExecutorServicecreate(java.util.function.BiFunction<java.lang.Runnable,java.lang.String,java.lang.Thread> threadSupplier, java.lang.String alias)Creates an executor services that creates thread's based on thethread supplier.static java.util.concurrent.ExecutorServicecreate(java.util.function.Function<java.lang.Runnable,java.lang.Thread> threadSupplier)Creates an executor service that creates thread's based on thethread supplierprivate static java.lang.StringgenerateDefaultThreadName(java.lang.String alias)static java.util.concurrent.ExecutorServicesameThreadExecutorService()
-
-
-
Method Detail
-
sameThreadExecutorService
public static java.util.concurrent.ExecutorService sameThreadExecutorService()
- Returns:
- A executor service that executes tasks in the caller's thread
-
create
public static java.util.concurrent.ExecutorService create(java.util.function.Function<java.lang.Runnable,java.lang.Thread> threadSupplier)
Creates an executor service that creates thread's based on thethread supplier- Parameters:
threadSupplier- The thread supplier- Returns:
- An executor service that will use the thread created by the
threadSupplierwhen polling
-
create
public static java.util.concurrent.ExecutorService create(java.util.function.BiFunction<java.lang.Runnable,java.lang.String,java.lang.Thread> threadSupplier, java.lang.String alias)Creates an executor services that creates thread's based on thethread supplier. The first argument to thethreadSupplieris the Runnable (the condition that will be evaluated). The second argument is the default thread name generated by Awaitility.- Parameters:
threadSupplier- The thread supplier- Returns:
- An executor service that will use the thread created by the
threadSupplierwhen polling
-
generateDefaultThreadName
private static java.lang.String generateDefaultThreadName(java.lang.String alias)
-
-