@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
InterruptedExceptionpublic Future<V> poll(long timeout, TimeUnit unit) throws InterruptedException
InterruptedExceptionpublic void cancelAll(boolean interrupt)
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.