1 7 8 package java.util.concurrent; 9 10 import java.util.List ; 11 import java.util.Collection ; 12 import java.security.PrivilegedAction ; 13 import java.security.PrivilegedExceptionAction ; 14 15 77 public interface ExecutorService extends Executor { 78 79 90 void shutdown(); 91 92 109 List <Runnable > shutdownNow(); 110 111 116 boolean isShutdown(); 117 118 125 boolean isTerminated(); 126 127 138 boolean awaitTermination(long timeout, TimeUnit unit) 139 throws InterruptedException ; 140 141 142 162 <T> Future <T> submit(Callable <T> task); 163 164 178 <T> Future <T> submit(Runnable task, T result); 179 180 192 Future <?> submit(Runnable task); 193 194 213 214 <T> List <Future <T>> invokeAll(Collection <Callable <T>> tasks) 215 throws InterruptedException ; 216 217 243 <T> List <Future <T>> invokeAll(Collection <Callable <T>> tasks, 244 long timeout, TimeUnit unit) 245 throws InterruptedException ; 246 247 264 <T> T invokeAny(Collection <Callable <T>> tasks) 265 throws InterruptedException , ExecutionException ; 266 267 288 <T> T invokeAny(Collection <Callable <T>> tasks, 289 long timeout, TimeUnit unit) 290 throws InterruptedException , ExecutionException , TimeoutException ; 291 292 } 293 | Popular Tags |