/** * {@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); }
@Override public Scheduler newElastic(int ttlSeconds, ThreadFactory threadFactory) { return Schedulers.Factory.super.newElastic( ttlSeconds, 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); }