V - the type of results returned by the submitted tasks.public class JPPFCompletionService<V> extends Object implements CompletionService<V>
CompletionService which works specifically with JPPFExecutorServices.| Constructor and Description |
|---|
JPPFCompletionService(JPPFExecutorService executor)
Initialize this completion service with the specified executor.
|
public JPPFCompletionService(JPPFExecutorService executor)
executor - the executor to which tasks are submitted.public Future<V> submit(Callable<V> task)
submit in interface CompletionService<V>public Future<V> submit(Runnable task, V result)
submit in interface CompletionService<V>public Future<V> take() throws InterruptedException
take in interface CompletionService<V>InterruptedExceptionpublic Future<V> poll()
poll in interface CompletionService<V>public Future<V> poll(long timeout, TimeUnit unit) throws InterruptedException
poll in interface CompletionService<V>InterruptedExceptionCopyright © 2005-2019 JPPF Team.