@InterfaceAudience.Private class SimpleServerRpcConnection extends ServerRpcConnection
| Modifier and Type | Field and Description |
|---|---|
(package private) SocketChannel |
channel |
private boolean |
connectionPreambleRead |
private ByteBuff |
data |
private ByteBuffer |
dataLengthBuffer |
private long |
lastContact |
(package private) long |
lastSentTime |
private ByteBuffer |
preambleBuffer |
(package private) SimpleRpcServerResponder |
responder |
(package private) ConcurrentLinkedDeque<RpcResponse> |
responseQueue |
(package private) Lock |
responseWriteLock |
private LongAdder |
rpcCount |
private Socket |
socket |
addr, authenticatedWithFallback, callCleanup, codec, compressionCodec, connectionHeader, connectionHeaderRead, cryptoAES, hostAddress, provider, remotePort, retryImmediatelySupported, rpcServer, saslContextEstablished, saslProviders, saslServer, service, skipInitialSaslHandshake, ugi, useCryptoAesWrap, user, useSasl, useWrap| Constructor and Description |
|---|
SimpleServerRpcConnection(SimpleRpcServer rpcServer,
SocketChannel channel,
long lastContact) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
channelDataRead(ReadableByteChannel channel,
ByteBuff buf) |
void |
close() |
SimpleServerCall |
createCall(int id,
org.apache.hbase.thirdparty.com.google.protobuf.BlockingService service,
org.apache.hbase.thirdparty.com.google.protobuf.Descriptors.MethodDescriptor md,
org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header,
org.apache.hbase.thirdparty.com.google.protobuf.Message param,
CellScanner cellScanner,
long size,
InetAddress remoteAddress,
int timeout,
RpcServer.CallCleanup reqCleanup) |
protected void |
decRpcCount() |
protected void |
doRespond(RpcResponse resp) |
long |
getLastContact() |
protected void |
incRpcCount() |
private void |
initByteBuffToReadInto(int length) |
boolean |
isConnectionOpen() |
(package private) boolean |
isIdle() |
private void |
process()
Process the data buffer and clean the connection state for the next call.
|
private int |
read4Bytes() |
int |
readAndProcess()
Read off the wire.
|
private int |
readPreamble() |
void |
setLastContact(long lastContact) |
disposeSasl, doRawSaslReply, getErrorResponse, getHostAddress, getHostInetAddress, getRemotePort, getVersionInfo, isSimpleAuthentication, processOneRpc, processPreamble, processRequest, saslReadAndProcess, toStringfinal SocketChannel channel
private ByteBuffer dataLengthBuffer
private ByteBuffer preambleBuffer
private long lastContact
final SimpleRpcServerResponder responder
private boolean connectionPreambleRead
final ConcurrentLinkedDeque<RpcResponse> responseQueue
final Lock responseWriteLock
long lastSentTime
public SimpleServerRpcConnection(SimpleRpcServer rpcServer, SocketChannel channel, long lastContact)
public void setLastContact(long lastContact)
public long getLastContact()
boolean isIdle()
protected void decRpcCount()
protected void incRpcCount()
private int readPreamble() throws IOException
IOExceptionprivate int read4Bytes() throws IOException
IOExceptionpublic int readAndProcess() throws IOException, InterruptedException
IOExceptionInterruptedExceptionprivate void initByteBuffToReadInto(int length)
protected int channelDataRead(ReadableByteChannel channel, ByteBuff buf) throws IOException
IOExceptionprivate void process() throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void close()
public boolean isConnectionOpen()
isConnectionOpen in class ServerRpcConnectionpublic SimpleServerCall createCall(int id, org.apache.hbase.thirdparty.com.google.protobuf.BlockingService service, org.apache.hbase.thirdparty.com.google.protobuf.Descriptors.MethodDescriptor md, org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header, org.apache.hbase.thirdparty.com.google.protobuf.Message param, CellScanner cellScanner, long size, InetAddress remoteAddress, int timeout, RpcServer.CallCleanup reqCleanup)
createCall in class ServerRpcConnectionprotected void doRespond(RpcResponse resp) throws IOException
doRespond in class ServerRpcConnectionIOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.