@InterfaceAudience.Private public class ResultBoundedCompletionService<V> extends Object
Constructor and Description |
---|
ResultBoundedCompletionService(RpcRetryingCallerFactory retryingCallerFactory,
Executor executor,
int maxTasks) |
Modifier and Type | Method and Description |
---|---|
void |
cancelAll() |
org.apache.hadoop.hbase.client.ResultBoundedCompletionService.QueueingFuture<V> |
poll(long timeout,
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,
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, 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 InterruptedException
InterruptedException
public org.apache.hadoop.hbase.client.ResultBoundedCompletionService.QueueingFuture<V> poll(long timeout, TimeUnit unit) throws InterruptedException
timeout
- - time to wait before it times outunit
- - time unit for timeoutInterruptedException
public org.apache.hadoop.hbase.client.ResultBoundedCompletionService.QueueingFuture<V> pollForFirstSuccessfullyCompletedTask(long timeout, TimeUnit unit, int startIndex, int endIndex) throws InterruptedException, CancellationException, ExecutionException
timeout
- - time to wait before it times outunit
- - time unit for timeoutstartIndex
- - start index, starting from 0, inclusiveendIndex
- - end index, exclusiveInterruptedException
CancellationException
ExecutionException
public void cancelAll()
Copyright © 2007–2019 Cloudera. All rights reserved.