/** * {@link Scheduler} that hosts a fixed pool of single-threaded ExecutorService-based * workers and is suited for parallel work. * * @return default instance of a {@link Scheduler} that hosts a fixed pool of single-threaded * ExecutorService-based workers */ public static Scheduler parallel() { return cache(CACHED_PARALLEL, PARALLEL, PARALLEL_SUPPLIER); }
/** * {@link Scheduler} that hosts a single-threaded ExecutorService-based worker and is * suited for parallel work. Will cache the returned schedulers for subsequent calls until dispose. * * @return default instance of a {@link Scheduler} that hosts a single-threaded * ExecutorService-based worker */ public static Scheduler single() { return cache(CACHED_SINGLE, SINGLE, SINGLE_SUPPLIER); }
/** * {@link Scheduler} that dynamically creates ExecutorService-based Workers and caches * the thread pools, reusing them once the Workers have been shut down. * <p> * The maximum number of created thread pools is unbounded. * <p> * The default time-to-live for unused thread pools is 60 seconds, use the appropriate * factory to set a different value. * <p> * This scheduler is not restartable. * * @return default instance of a {@link Scheduler} that hosts a fixed pool of single-threaded * ExecutorService-based workers and is suited for parallel work */ public static Scheduler elastic() { return cache(CACHED_ELASTIC, ELASTIC, ELASTIC_SUPPLIER); }
/** * {@link Scheduler} that hosts a fixed pool of single-threaded ExecutorService-based * workers and is suited for parallel work. * * @return default instance of a {@link Scheduler} that hosts a fixed pool of single-threaded * ExecutorService-based workers */ public static Scheduler parallel() { return cache(CACHED_PARALLEL, PARALLEL, PARALLEL_SUPPLIER); }
/** * {@link Scheduler} that hosts a single-threaded ExecutorService-based worker and is * suited for parallel work. Will cache the returned schedulers for subsequent calls until dispose. * * @return default instance of a {@link Scheduler} that hosts a single-threaded * ExecutorService-based worker */ public static Scheduler single() { return cache(CACHED_SINGLE, SINGLE, SINGLE_SUPPLIER); }
/** * {@link Scheduler} that dynamically creates ExecutorService-based Workers and caches * the thread pools, reusing them once the Workers have been shut down. * <p> * The maximum number of created thread pools is unbounded. * <p> * The default time-to-live for unused thread pools is 60 seconds, use the appropriate * factory to set a different value. * <p> * This scheduler is not restartable. * * @return default instance of a {@link Scheduler} that hosts a fixed pool of single-threaded * ExecutorService-based workers and is suited for parallel work */ public static Scheduler elastic() { return cache(CACHED_ELASTIC, ELASTIC, ELASTIC_SUPPLIER); }