package java.util.concurrent; public interface CompletionService { public Future submit(Callable task); public Future submit(Runnable task, T result); public Future take() throws InterruptedException; public Future poll(); public Future poll(long timeout, TimeUnit unit) throws InterruptedException; }