class ResultBoundedCompletionService.QueueingFuture<T> extends Object implements RunnableFuture<T>
Modifier and Type | Field and Description |
---|---|
private int |
callTimeout |
private boolean |
cancelled |
private ExecutionException |
exeEx |
private RetryingCallable<T> |
future |
private int |
replicaId |
private T |
result |
private boolean |
resultObtained |
private RpcRetryingCaller<T> |
retryingCaller |
Constructor and Description |
---|
QueueingFuture(RetryingCallable<T> future,
int callTimeout,
int id) |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
T |
get() |
T |
get(long timeout,
TimeUnit unit) |
ExecutionException |
getExeEx() |
int |
getReplicaId() |
boolean |
isCancelled() |
boolean |
isDone() |
void |
run() |
private final RetryingCallable<T> future
private ExecutionException exeEx
private volatile boolean cancelled
private final int callTimeout
private final RpcRetryingCaller<T> retryingCaller
private boolean resultObtained
private final int replicaId
public QueueingFuture(RetryingCallable<T> future, int callTimeout, int id)
public void run()
run
in interface Runnable
run
in interface RunnableFuture<T>
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled
in interface Future<T>
public T get() throws InterruptedException, ExecutionException
get
in interface Future<T>
InterruptedException
ExecutionException
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<T>
InterruptedException
ExecutionException
TimeoutException
public int getReplicaId()
public ExecutionException getExeEx()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.