class RpcRetryingCallerWithReadReplicas.ReplicaRegionServerCallable extends RegionServerCallable<Result> implements Cancellable
Modifier and Type | Field and Description |
---|---|
private PayloadCarryingRpcController |
controller |
(package private) int |
id |
connection, location, row, tableName
Constructor and Description |
---|
RpcRetryingCallerWithReadReplicas.ReplicaRegionServerCallable(int id,
HRegionLocation location) |
Modifier and Type | Method and Description |
---|---|
Result |
call(int callTimeout)
Computes a result, or throws an exception if unable to do so.
|
void |
cancel() |
boolean |
isCancelled() |
void |
prepare(boolean reload)
Two responsibilities
- if the call is already completed (by another replica) stops the retries.
|
getConnection, getExceptionMessageAdditionalDetail, getHRegionInfo, getLocation, getRow, getStub, getTableName, setLocation, setStub, sleep, throwable
final int id
private final PayloadCarryingRpcController controller
public RpcRetryingCallerWithReadReplicas.ReplicaRegionServerCallable(int id, HRegionLocation location)
public void cancel()
cancel
in interface Cancellable
public void prepare(boolean reload) throws IOException
prepare
in interface RetryingCallable<Result>
prepare
in class RegionServerCallable<Result>
reload
- Set this to true if connection should re-find the regionIOException
- epublic Result call(int callTimeout) throws Exception
RetryingCallable
call
in interface RetryingCallable<Result>
callTimeout
- - the time available for this call. 0 for infinite.Exception
- if unable to compute a resultpublic boolean isCancelled()
isCancelled
in interface Cancellable
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.