return factory.decorateExecutorService(schedulerType, () -> beforeFactory);
return factory.decorateExecutorService(schedulerType, () -> beforeFactory);
/** * {@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> * This scheduler is not restartable. * * @param ttlSeconds Time-to-live for an idle {@link reactor.core.scheduler.Scheduler.Worker} * @param threadFactory a {@link ThreadFactory} to use each thread initialization * * @return a new {@link Scheduler} that dynamically creates ExecutorService-based * Workers and caches the thread pools, reusing them once the Workers have been shut * down. */ public static Scheduler newElastic(int ttlSeconds, ThreadFactory threadFactory) { return factory.newElastic(ttlSeconds, threadFactory); }
/** * {@link Scheduler} that hosts a single-threaded ExecutorService-based worker and is * suited for parallel work. * * @param threadFactory a {@link ThreadFactory} to use for the unique thread of the * {@link Scheduler} * * @return a new {@link Scheduler} that hosts a single-threaded ExecutorService-based * worker */ public static Scheduler newSingle(ThreadFactory threadFactory) { return factory.newSingle(threadFactory); }
@Override public Scheduler newElastic(int ttlSeconds, ThreadFactory threadFactory) { return Schedulers.Factory.super.newElastic( ttlSeconds, threadFactory ); }
/** * {@link Scheduler} that hosts a fixed pool of single-threaded ExecutorService-based * workers and is suited for parallel work. * * @param parallelism Number of pooled workers. * @param threadFactory a {@link ThreadFactory} to use for the fixed initialized * number of {@link Thread} * * @return a new {@link Scheduler} that hosts a fixed pool of single-threaded * ExecutorService-based workers and is suited for parallel work */ public static Scheduler newParallel(int parallelism, ThreadFactory threadFactory) { return factory.newParallel(parallelism, threadFactory); }
@Override public Scheduler newSingle(ThreadFactory threadFactory) { return Schedulers.Factory.super.newSingle( threadFactory ); } }
@Override public Scheduler newParallel(int parallelism, ThreadFactory threadFactory) { return Schedulers.Factory.super.newParallel( parallelism, threadFactory ); }
/** * {@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> * This scheduler is not restartable. * * @param ttlSeconds Time-to-live for an idle {@link reactor.core.scheduler.Scheduler.Worker} * @param threadFactory a {@link ThreadFactory} to use each thread initialization * * @return a new {@link Scheduler} that dynamically creates ExecutorService-based * Workers and caches the thread pools, reusing them once the Workers have been shut * down. */ public static Scheduler newElastic(int ttlSeconds, ThreadFactory threadFactory) { return factory.newElastic(ttlSeconds, threadFactory); }
/** * {@link Scheduler} that hosts a fixed pool of single-threaded ExecutorService-based * workers and is suited for parallel work. * * @param parallelism Number of pooled workers. * @param threadFactory a {@link ThreadFactory} to use for the fixed initialized * number of {@link Thread} * * @return a new {@link Scheduler} that hosts a fixed pool of single-threaded * ExecutorService-based workers and is suited for parallel work */ public static Scheduler newParallel(int parallelism, ThreadFactory threadFactory) { return factory.newParallel(parallelism, threadFactory); }
/** * {@link Scheduler} that hosts a single-threaded ExecutorService-based worker and is * suited for parallel work. * * @param threadFactory a {@link ThreadFactory} to use for the unique thread of the * {@link Scheduler} * * @return a new {@link Scheduler} that hosts a single-threaded ExecutorService-based * worker */ public static Scheduler newSingle(ThreadFactory threadFactory) { return factory.newSingle(threadFactory); }