@InterfaceAudience.Private public class BoundedCompletionService<V> extends Object
Modifier and Type | Class and Description |
---|---|
(package private) class |
BoundedCompletionService.QueueingFuture |
Modifier and Type | Field and Description |
---|---|
private BlockingQueue<Future<V>> |
completed |
private Executor |
executor |
private List<Future<V>> |
tasks |
Constructor and Description |
---|
BoundedCompletionService(Executor executor,
int maxTasks) |
private final BlockingQueue<Future<V>> completed
public BoundedCompletionService(Executor executor, int maxTasks)
public Future<V> take() throws InterruptedException
InterruptedException
public Future<V> poll(long timeout, TimeUnit unit) throws InterruptedException
InterruptedException
public void cancelAll(boolean interrupt)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.