@InterfaceAudience.Private public class ResultBoundedCompletionService<V> extends java.lang.Object
| Constructor and Description |
|---|
ResultBoundedCompletionService(RpcRetryingCallerFactory retryingCallerFactory,
java.util.concurrent.Executor executor,
int maxTasks) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelAll() |
org.apache.hadoop.hbase.client.ResultBoundedCompletionService.QueueingFuture<V> |
poll(long timeout,
java.util.concurrent.TimeUnit unit)
Poll for the first completed task whether it is a success or execution exception.
|
org.apache.hadoop.hbase.client.ResultBoundedCompletionService.QueueingFuture<V> |
pollForFirstSuccessfullyCompletedTask(long timeout,
java.util.concurrent.TimeUnit unit,
int startIndex,
int endIndex)
Poll for the first successfully completed task whose completed order is in startIndex,
endIndex(exclusive) range
|
void |
submit(RetryingCallable<V> task,
int callTimeout,
int id) |
org.apache.hadoop.hbase.client.ResultBoundedCompletionService.QueueingFuture<V> |
take() |
public ResultBoundedCompletionService(RpcRetryingCallerFactory retryingCallerFactory, java.util.concurrent.Executor executor, int maxTasks)
public void submit(RetryingCallable<V> task, int callTimeout, int id)
public org.apache.hadoop.hbase.client.ResultBoundedCompletionService.QueueingFuture<V> take() throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic org.apache.hadoop.hbase.client.ResultBoundedCompletionService.QueueingFuture<V> poll(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
timeout - - time to wait before it times outunit - - time unit for timeoutjava.lang.InterruptedExceptionpublic org.apache.hadoop.hbase.client.ResultBoundedCompletionService.QueueingFuture<V> pollForFirstSuccessfullyCompletedTask(long timeout, java.util.concurrent.TimeUnit unit, int startIndex, int endIndex) throws java.lang.InterruptedException, java.util.concurrent.CancellationException, java.util.concurrent.ExecutionException
timeout - - time to wait before it times outunit - - time unit for timeoutstartIndex - - start index, starting from 0, inclusiveendIndex - - end index, exclusivejava.lang.InterruptedExceptionjava.util.concurrent.CancellationExceptionjava.util.concurrent.ExecutionExceptionpublic void cancelAll()