Class InternalExecutorServiceFactory


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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      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 the thread supplier.
      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 the thread supplier
      private static java.lang.String generateDefaultThreadName​(java.lang.String alias)  
      static java.util.concurrent.ExecutorService sameThreadExecutorService()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InternalExecutorServiceFactory

        public InternalExecutorServiceFactory()
    • 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 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 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 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 java.lang.String generateDefaultThreadName​(java.lang.String alias)