标签:oid abstract for void long and color .com 线程
图来
上述图片表述的线程池的 主要结成结构 其中
public interface Executor { // 一个运行的命令将在某时 执行, // 一个新的线程,或者线程池,或者 calling void execute(Runnable command); }
public abstract class AbstractExecutorService implements ExecutorService { protected <T> RunnableFuture<T> newTaskFor(Runnable runnable, T value) protected <T> RunnableFuture<T> newTaskFor(Callable<T> callable) public Future<?> submit(Runnable task) public <T> Future<T> submit(Runnable task, T result) public <T> Future<T> submit(Callable<T> task) private <T> T doInvokeAny(Collection<? extends Callable<T>> tasks, boolean timed, long nanos); public <T> T invokeAny(Collection<? extends Callable<T>> tasks); public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit); public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks); public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) }
标签:oid abstract for void long and color .com 线程
原文地址:http://www.cnblogs.com/shuly/p/7374626.html