public class TaskExecutorCompletionService<V> extends ExecutorCompletionService<V> implements TaskCompletionService<V>
| Constructor and Description |
|---|
TaskExecutorCompletionService(TaskExecutorService executor) |
TaskExecutorCompletionService(TaskExecutorService executor,
BlockingQueue<Promise<V>> completionQueue) |
public TaskExecutorCompletionService(TaskExecutorService executor)
public TaskExecutorCompletionService(TaskExecutorService executor, BlockingQueue<Promise<V>> completionQueue)
public Promise<V> submit(Callable<V> task)
submit in interface CompletionService<V>submit in interface TaskCompletionService<V>submit in class ExecutorCompletionService<V>public Promise<V> submit(Runnable task, V result)
submit in interface CompletionService<V>submit in interface TaskCompletionService<V>submit in class ExecutorCompletionService<V>public Promise<V> take() throws InterruptedException
take in interface CompletionService<V>take in interface TaskCompletionService<V>take in class ExecutorCompletionService<V>InterruptedExceptionpublic Promise<V> poll()
poll in interface CompletionService<V>poll in interface TaskCompletionService<V>poll in class ExecutorCompletionService<V>public Promise<V> poll(long timeout, TimeUnit unit) throws InterruptedException
poll in interface CompletionService<V>poll in interface TaskCompletionService<V>poll in class ExecutorCompletionService<V>InterruptedExceptionCopyright © 2021. All rights reserved.