In the last blog post on Executor Framework, I had written about ThreadPoolExecutor. In this blog post, I’m writing about ScheduledThreadPoolExecutor and ForkJoinPool.
ScheduledThreadPoolExecutor like ThreadPoolExecutor is a class of Concurrency API. It is an implementation of ScheduledExecutorService interface and is a subclass of ThreadPoolExecutor.
The ScheduledExecutorService provides methods to execute Callable or Runnable tasks periodically or after a certain delay. An initial delay can also be specified while executing these tasks. The schedule(Runnable command, long delay, TimeUnit unit) and schedule(Callable<V> callable, long delay, TimeUnit unit) methods can be called for giving a minimum time delay […]