@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, toString
final 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
IOException
private int read4Bytes() throws IOException
IOException
public int readAndProcess() throws IOException, InterruptedException
IOException
InterruptedException
private void initByteBuffToReadInto(int length)
protected int channelDataRead(ReadableByteChannel channel, ByteBuff buf) throws IOException
IOException
private void process() throws IOException, InterruptedException
IOException
InterruptedException
public void close()
public boolean isConnectionOpen()
isConnectionOpen
in class ServerRpcConnection
public 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 ServerRpcConnection
protected void doRespond(RpcResponse resp) throws IOException
doRespond
in class ServerRpcConnection
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.