@InterfaceAudience.Private public class ResultBoundedCompletionService<V> extends Object
Modifier and Type | Class and Description |
---|---|
(package private) class |
ResultBoundedCompletionService.QueueingFuture<T> |
Modifier and Type | Field and Description |
---|---|
private boolean |
cancelled |
private ResultBoundedCompletionService.QueueingFuture<V> |
completed |
private Executor |
executor |
private RpcRetryingCallerFactory |
retryingCallerFactory |
private ResultBoundedCompletionService.QueueingFuture<V>[] |
tasks |
Constructor and Description |
---|
ResultBoundedCompletionService(RpcRetryingCallerFactory retryingCallerFactory,
Executor executor,
int maxTasks) |
Modifier and Type | Method and Description |
---|---|
void |
cancelAll() |
ResultBoundedCompletionService.QueueingFuture<V> |
poll(long timeout,
TimeUnit unit) |
void |
submit(RetryingCallable<V> task,
int callTimeout,
int id) |
ResultBoundedCompletionService.QueueingFuture<V> |
take() |
private final RpcRetryingCallerFactory retryingCallerFactory
private final Executor executor
private final ResultBoundedCompletionService.QueueingFuture<V>[] tasks
private volatile ResultBoundedCompletionService.QueueingFuture<V> completed
private volatile boolean cancelled
public ResultBoundedCompletionService(RpcRetryingCallerFactory retryingCallerFactory, Executor executor, int maxTasks)
public void submit(RetryingCallable<V> task, int callTimeout, int id)
public ResultBoundedCompletionService.QueueingFuture<V> take() throws InterruptedException
InterruptedException
public ResultBoundedCompletionService.QueueingFuture<V> poll(long timeout, TimeUnit unit) throws InterruptedException
InterruptedException
public void cancelAll()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.