Class InternalExecutorServiceFactory

java.lang.Object
org.awaitility.core.InternalExecutorServiceFactory

public class InternalExecutorServiceFactory extends Object
Please don't use this class directly, it's for internal purposes only and will be moved/renamed without notice!
  • Constructor Details

    • InternalExecutorServiceFactory

      public InternalExecutorServiceFactory()
  • Method Details

    • sameThreadExecutorService

      public static ExecutorService sameThreadExecutorService()
      Returns:
      A executor service that executes tasks in the caller's thread
    • create

      public static ExecutorService create(Function<Runnable,Thread> threadSupplier)
      Creates an executor service that creates thread's based on the thread supplier
      Parameters:
      threadSupplier - The thread supplier
      Returns:
      An executor service that will use the thread created by the threadSupplier when polling
    • create

      public static ExecutorService create(BiFunction<Runnable,String,Thread> threadSupplier, String alias)
      Creates an executor services that creates thread's based on the thread supplier. The first argument to the threadSupplier is 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 threadSupplier when polling
    • generateDefaultThreadName

      private static String generateDefaultThreadName(String alias)