org.apache.hadoop.hbase.ipc
Interface RpcCallContext

All Superinterfaces:
Delayable

@InterfaceAudience.Private
public interface RpcCallContext
extends Delayable


Method Summary
 long disconnectSince()
          Check if the caller who made this IPC call has disconnected.
 InetAddress getRemoteAddress()
           
 User getRequestUser()
          Returns the user credentials associated with the current RPC request or null if no credentials were provided.
 String getRequestUserName()
           
 boolean isClientCellBlockSupport()
          If the client connected and specified a codec to use, then we will use this codec making cellblocks to return.
 
Methods inherited from interface org.apache.hadoop.hbase.ipc.Delayable
endDelay, endDelay, endDelayThrowing, isDelayed, isReturnValueDelayed, startDelay
 

Method Detail

disconnectSince

long disconnectSince()
Check if the caller who made this IPC call has disconnected. If called from outside the context of IPC, this does nothing.

Returns:
< 0 if the caller is still connected. The time in ms since the disconnection otherwise

isClientCellBlockSupport

boolean isClientCellBlockSupport()
If the client connected and specified a codec to use, then we will use this codec making cellblocks to return. If the client did not specify a codec, we assume it does not support cellblocks and will return all content protobuf'd (though it makes our serving slower). We need to ask this question per call because a server could be hosting both clients that support cellblocks while fielding requests from clients that do not.

Returns:
True if the client supports cellblocks, else return all content in pb

getRequestUser

User getRequestUser()
Returns the user credentials associated with the current RPC request or null if no credentials were provided.

Returns:
A User

getRequestUserName

String getRequestUserName()
Returns:
Current request's user name or null if none ongoing.

getRemoteAddress

InetAddress getRemoteAddress()
Returns:
Address of remote client if a request is ongoing, else null


Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.