public TimeScheduler3(Executor thread_pool, ThreadFactory factory) { timer_thread_factory=factory; pool=thread_pool; start(); }
/** * Create a scheduler that executes tasks in dynamically adjustable intervals */ public TimeScheduler3() { pool=new ThreadPoolExecutor(4, 10, 30000, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<>(100), Executors.defaultThreadFactory(), new ThreadPoolExecutor.CallerRunsPolicy()); start(); }
public TimeScheduler3(ThreadFactory factory, int min_threads, int max_threads, long keep_alive_time, BlockingQueue<Runnable> queue, String rejection_policy, boolean thread_pool_enabled) { timer_thread_factory=factory; pool=thread_pool_enabled? new ThreadPoolExecutor(min_threads, max_threads,keep_alive_time, TimeUnit.MILLISECONDS, queue, factory, Util.parseRejectionPolicy(rejection_policy)) : new DirectExecutor(); start(); }
public TimeScheduler3(Executor thread_pool, ThreadFactory factory) { timer_thread_factory=factory; pool=thread_pool; start(); }
/** * Create a scheduler that executes tasks in dynamically adjustable intervals */ public TimeScheduler3() { pool=new ThreadPoolExecutor(4, 10, 30000, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<>(100), Executors.defaultThreadFactory(), new ThreadPoolExecutor.CallerRunsPolicy()); start(); }
public TimeScheduler3(ThreadFactory factory, int min_threads, int max_threads, long keep_alive_time, BlockingQueue<Runnable> queue, String rejection_policy, boolean thread_pool_enabled) { timer_thread_factory=factory; pool=thread_pool_enabled? new ThreadPoolExecutor(min_threads, max_threads,keep_alive_time, TimeUnit.MILLISECONDS, queue, factory, Util.parseRejectionPolicy(rejection_policy)) : new DirectExecutor(); start(); }