@InterfaceAudience.LimitedPrivate(value={"Coprocesssor","Phoenix"}) @InterfaceStability.Evolving public class RpcServer.Call extends java.lang.Object implements RpcCallContext
| Modifier and Type | Field and Description |
|---|---|
protected CellScanner |
cellScanner |
protected RpcServer.Connection |
connection |
protected boolean |
delayResponse |
protected boolean |
delayReturnValue |
protected RPCProtos.RequestHeader |
header |
protected int |
id |
protected boolean |
isError |
protected MethodDescriptor |
md |
protected Message |
param |
protected RpcServer.Responder |
responder |
protected org.apache.hadoop.hbase.ipc.BufferChain |
response
Chain of buffers to send as response.
|
protected BlockingService |
service |
protected long |
size |
protected long |
timestamp |
protected TraceInfo |
tinfo |
| Modifier and Type | Method and Description |
|---|---|
long |
disconnectSince()
Check if the caller who made this IPC call has disconnected.
|
void |
endDelay()
Signal the end of a delayed RPC, without specifying the return value.
|
void |
endDelay(java.lang.Object result)
Signal that the RPC server is now allowed to send the response.
|
void |
endDelayThrowing(java.lang.Throwable t)
End the call, throwing and exception to the caller.
|
RPCProtos.VersionInfo |
getClientVersionInfo() |
protected RPCProtos.RequestHeader |
getHeader() |
int |
getPriority() |
java.net.InetAddress |
getRemoteAddress() |
UserGroupInformation |
getRemoteUser() |
User |
getRequestUser()
Returns the user credentials associated with the current RPC request or
null if no credentials were provided. |
java.lang.String |
getRequestUserName() |
long |
getSize() |
boolean |
hasPriority() |
boolean |
isClientCellBlockSupport()
If the client connected and specified a codec to use, then we will use this codec making
cellblocks to return.
|
boolean |
isDelayed() |
boolean |
isReturnValueDelayed() |
void |
sendResponseIfReady()
If we have a response, and delay is not set, then respond
immediately.
|
protected void |
setResponse(java.lang.Object m,
CellScanner cells,
java.lang.Throwable t,
java.lang.String errorMsg) |
protected void |
setSaslTokenResponse(java.nio.ByteBuffer response) |
void |
startDelay(boolean delayReturnValue)
Signal that the call response should be delayed, thus freeing the RPC
server to handle different requests.
|
java.lang.String |
toString() |
protected int id
protected BlockingService service
protected MethodDescriptor md
protected RPCProtos.RequestHeader header
protected Message param
protected CellScanner cellScanner
protected RpcServer.Connection connection
protected long timestamp
protected org.apache.hadoop.hbase.ipc.BufferChain response
protected boolean delayResponse
protected RpcServer.Responder responder
protected boolean delayReturnValue
protected long size
protected boolean isError
protected TraceInfo tinfo
public java.lang.String toString()
toString in class java.lang.Objectprotected RPCProtos.RequestHeader getHeader()
public boolean hasPriority()
public int getPriority()
protected void setSaslTokenResponse(java.nio.ByteBuffer response)
protected void setResponse(java.lang.Object m,
CellScanner cells,
java.lang.Throwable t,
java.lang.String errorMsg)
public void endDelay(java.lang.Object result)
throws java.io.IOException
Delayablepublic void endDelay()
throws java.io.IOException
Delayablepublic void startDelay(boolean delayReturnValue)
DelayablestartDelay in interface DelayabledelayReturnValue - 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(java.lang.Throwable t)
throws java.io.IOException
DelayableendDelayThrowing in interface Delayablet - Object to throw to the client.java.io.IOExceptionpublic boolean isDelayed()
public boolean isReturnValueDelayed()
isReturnValueDelayed in interface Delayablepublic boolean isClientCellBlockSupport()
RpcCallContextisClientCellBlockSupport in interface RpcCallContextpublic long disconnectSince()
RpcCallContextdisconnectSince in interface RpcCallContextpublic long getSize()
public void sendResponseIfReady()
throws java.io.IOException
java.io.IOExceptionpublic UserGroupInformation getRemoteUser()
public User getRequestUser()
RpcCallContextnull if no credentials were provided.getRequestUser in interface RpcCallContextpublic java.lang.String getRequestUserName()
getRequestUserName in interface RpcCallContextpublic java.net.InetAddress getRemoteAddress()
getRemoteAddress in interface RpcCallContextpublic RPCProtos.VersionInfo getClientVersionInfo()
getClientVersionInfo in interface RpcCallContext