|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.ipc.HBaseServer.Call
protected class HBaseServer.Call
A call queued for handling.
Field Summary | |
---|---|
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 Summary | |
---|---|
HBaseServer.Call(int id,
org.apache.hadoop.io.Writable param,
HBaseServer.Connection connection,
HBaseServer.Responder responder,
long size)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public HBaseServer.Call(int id, org.apache.hadoop.io.Writable param, HBaseServer.Connection connection, HBaseServer.Responder responder, long size)
Method Detail |
---|
public String toString()
toString
in class Object
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()
isDelayed
in interface Delayable
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |