public class TimeLimitedRpcController extends Object implements RpcController
Modifier and Type | Field and Description |
---|---|
protected Integer |
callTimeout
The time, in ms before the call should expire.
|
protected AtomicReference<RpcCallback<Object>> |
cancellationCb |
protected boolean |
cancelled |
Constructor and Description |
---|
TimeLimitedRpcController() |
Modifier and Type | Method and Description |
---|---|
String |
errorText() |
boolean |
failed() |
Integer |
getCallTimeout() |
boolean |
hasCallTimeout() |
boolean |
isCanceled() |
void |
notifyOnCancel(RpcCallback<Object> cancellationCb) |
void |
reset() |
void |
setCallTimeout(int callTimeout) |
void |
setFailed(String arg0) |
void |
startCancel() |
protected volatile Integer callTimeout
protected volatile boolean cancelled
protected final AtomicReference<RpcCallback<Object>> cancellationCb
public Integer getCallTimeout()
public void setCallTimeout(int callTimeout)
public boolean hasCallTimeout()
public String errorText()
errorText
in interface RpcController
public boolean failed()
failed
in interface RpcController
public boolean isCanceled()
isCanceled
in interface RpcController
public void notifyOnCancel(RpcCallback<Object> cancellationCb)
notifyOnCancel
in interface RpcController
public void reset()
reset
in interface RpcController
public void setFailed(String arg0)
setFailed
in interface RpcController
public void startCancel()
startCancel
in interface RpcController
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.