@InterfaceAudience.LimitedPrivate(value={"Coprocesssor","Phoenix"}) @InterfaceStability.Evolving public class RpcServer.Call extends 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 com.google.protobuf.Descriptors.MethodDescriptor |
md |
protected com.google.protobuf.Message |
param |
protected RpcServer.Responder |
responder |
protected org.apache.hadoop.hbase.ipc.BufferChain |
response
Chain of buffers to send as response.
|
protected com.google.protobuf.BlockingService |
service |
protected long |
size |
protected long |
timestamp |
protected org.apache.htrace.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(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.
|
RPCProtos.VersionInfo |
getClientVersionInfo() |
protected RPCProtos.RequestHeader |
getHeader() |
int |
getPriority() |
InetAddress |
getRemoteAddress() |
org.apache.hadoop.security.UserGroupInformation |
getRemoteUser() |
User |
getRequestUser()
Returns the user credentials associated with the current RPC request or
null if no credentials were provided. |
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(Object m,
CellScanner cells,
Throwable t,
String errorMsg) |
protected void |
setSaslTokenResponse(ByteBuffer response) |
void |
startDelay(boolean delayReturnValue)
Signal that the call response should be delayed, thus freeing the RPC
server to handle different requests.
|
String |
toString() |
protected int id
protected com.google.protobuf.BlockingService service
protected com.google.protobuf.Descriptors.MethodDescriptor md
protected RPCProtos.RequestHeader header
protected com.google.protobuf.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 org.apache.htrace.TraceInfo tinfo
protected RPCProtos.RequestHeader getHeader()
public boolean hasPriority()
public int getPriority()
protected void setSaslTokenResponse(ByteBuffer response)
protected void setResponse(Object m, CellScanner cells, Throwable t, String errorMsg)
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 boolean isClientCellBlockSupport()
RpcCallContext
isClientCellBlockSupport
in interface RpcCallContext
public long disconnectSince()
RpcCallContext
disconnectSince
in interface RpcCallContext
public long getSize()
public void sendResponseIfReady() throws IOException
IOException
public org.apache.hadoop.security.UserGroupInformation getRemoteUser()
public User getRequestUser()
RpcCallContext
null
if no credentials were provided.getRequestUser
in interface RpcCallContext
public String getRequestUserName()
getRequestUserName
in interface RpcCallContext
public InetAddress getRemoteAddress()
getRemoteAddress
in interface RpcCallContext
public RPCProtos.VersionInfo getClientVersionInfo()
getClientVersionInfo
in interface RpcCallContext
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.