JDK的线程池框架:Executor
Executor |
+ execute(Runnable command) |
ExecutorService |
+ shutdown() + isShudown() :boolean + isTeminated() :boolean + submit(Callable task) :Future |
Executors |
+ newFixedThreadPool(int nThread) :ExecutorService + newSingleThreadExecutor():ExecutorService +newSingleThreadScheduledExecutor():ScheduleExcutorService +newCachedThreadPool():ExecutorService +unconfigurableExecutorService:ExecutorService +unconfigurableScheduledExecutorService:ScheduledExecutorService +newScheduledThreadPool:ScheduledExecutorService |
ScheduledExecutorService |
+schedule(Runnable command, long delay, TimeUnit unit):ScheduledFuture |