protected class HBaseServer.Call extends Object implements RpcCallContext
Modifier and Type | Field and Description |
---|---|
protected HBaseServer.Connection |
connection |
protected boolean |
delayResponse |
protected boolean |
delayReturnValue |
protected int |
id |
protected boolean |
isError |
protected org.apache.hadoop.io.Writable |
param |
protected HBaseServer.Responder |
responder |
protected ByteBuffer |
response |
protected long |
size |
protected long |
timestamp |
Constructor and Description |
---|
HBaseServer.Call(int id,
org.apache.hadoop.io.Writable param,
HBaseServer.Connection connection,
HBaseServer.Responder responder,
long size) |
Modifier and Type | Method and Description |
---|---|
void |
endDelay()
Signal the end of a delayed RPC, without specifying the return value.
|
void |
endDelay(Object result)
Signal that the RPC server is now allowed to send the response.
|
void |
endDelayThrowing(Throwable t)
End the call, throwing and exception to the caller.
|
long |
getSize() |
boolean |
isDelayed() |
boolean |
isReturnValueDelayed() |
void |
sendResponseIfReady()
If we have a response, and delay is not set, then respond
immediately.
|
protected void |
setResponse(Object value,
org.apache.hadoop.hbase.ipc.Status status,
String errorClass,
String error) |
void |
startDelay(boolean delayReturnValue)
Signal that the call response should be delayed, thus freeing the RPC
server to handle different requests.
|
void |
throwExceptionIfCallerDisconnected()
Throw an exception if the caller who made this IPC call has disconnected.
|
String |
toString() |
protected int id
protected org.apache.hadoop.io.Writable param
protected HBaseServer.Connection connection
protected long timestamp
protected ByteBuffer response
protected boolean delayResponse
protected HBaseServer.Responder responder
protected boolean delayReturnValue
protected long size
protected boolean isError
public HBaseServer.Call(int id, org.apache.hadoop.io.Writable param, HBaseServer.Connection connection, HBaseServer.Responder responder, long size)
protected void setResponse(Object value, org.apache.hadoop.hbase.ipc.Status status, String errorClass, String error)
public void endDelay(Object result) throws IOException
Delayable
endDelay
in interface Delayable
result
- The value to return to the caller. If the corresponding
delay response specified that the return value should
not be delayed, this parameter must be null.IOException
public void endDelay() throws IOException
Delayable
endDelay
in interface Delayable
IOException
public void startDelay(boolean delayReturnValue)
Delayable
startDelay
in interface Delayable
delayReturnValue
- Controls whether the return value of the call
should be set when ending the delay or right away. There are cases when
the return value can be set right away, even if the call is delayed.public void endDelayThrowing(Throwable t) throws IOException
Delayable
endDelayThrowing
in interface Delayable
t
- Object to throw to the client.IOException
public boolean isDelayed()
public boolean isReturnValueDelayed()
isReturnValueDelayed
in interface Delayable
public void throwExceptionIfCallerDisconnected() throws CallerDisconnectedException
RpcCallContext
throwExceptionIfCallerDisconnected
in interface RpcCallContext
CallerDisconnectedException
public long getSize()
public void sendResponseIfReady() throws IOException
IOException
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.