@InterfaceAudience.Private public class TimeLimitedRpcController extends Object implements com.google.protobuf.RpcController
| 限定符和类型 | 字段和说明 |
|---|---|
protected Integer |
callTimeout
The time, in ms before the call should expire.
|
protected AtomicReference<com.google.protobuf.RpcCallback<Object>> |
cancellationCb |
protected boolean |
cancelled |
protected AtomicReference<com.google.protobuf.RpcCallback<IOException>> |
failureCb |
| 构造器和说明 |
|---|
TimeLimitedRpcController() |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
errorText() |
boolean |
failed()
For use in async rpc clients
|
Integer |
getCallTimeout() |
boolean |
hasCallTimeout() |
boolean |
isCanceled() |
void |
notifyOnCancel(com.google.protobuf.RpcCallback<Object> cancellationCb) |
void |
notifyOnFail(com.google.protobuf.RpcCallback<IOException> failureCb)
Notify a callback on error.
|
void |
reset() |
void |
setCallTimeout(int callTimeout) |
void |
setFailed(IOException e)
Set failed with an exception to pass on.
|
void |
setFailed(String reason) |
void |
startCancel() |
protected volatile Integer callTimeout
protected volatile boolean cancelled
protected final AtomicReference<com.google.protobuf.RpcCallback<Object>> cancellationCb
protected final AtomicReference<com.google.protobuf.RpcCallback<IOException>> failureCb
public Integer getCallTimeout()
public void setCallTimeout(int callTimeout)
public boolean hasCallTimeout()
public String errorText()
errorText 在接口中 com.google.protobuf.RpcControllerpublic boolean failed()
failed 在接口中 com.google.protobuf.RpcControllerpublic boolean isCanceled()
isCanceled 在接口中 com.google.protobuf.RpcControllerpublic void notifyOnCancel(com.google.protobuf.RpcCallback<Object> cancellationCb)
notifyOnCancel 在接口中 com.google.protobuf.RpcControllerpublic void notifyOnFail(com.google.protobuf.RpcCallback<IOException> failureCb)
failureCb - the callback to call on errorpublic void reset()
reset 在接口中 com.google.protobuf.RpcControllerpublic void setFailed(String reason)
setFailed 在接口中 com.google.protobuf.RpcControllerpublic void setFailed(IOException e)
e - exception to set withpublic void startCancel()
startCancel 在接口中 com.google.protobuf.RpcControllerCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.