Class ControlConnection
java.lang.Object
org.apache.drill.exec.rpc.AbstractRemoteConnection
org.apache.drill.exec.rpc.AbstractServerConnection<ControlConnection>
org.apache.drill.exec.rpc.control.ControlConnection
- All Implemented Interfaces:
AutoCloseable
,ClientConnection
,ConnectionThrottle
,EncryptionContext
,RemoteConnection
,ServerConnection<ControlConnection>
public class ControlConnection
extends AbstractServerConnection<ControlConnection>
implements ClientConnection
-
Field Summary
Fields inherited from class org.apache.drill.exec.rpc.AbstractRemoteConnection
saslCodec
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called from the RpcBus's channel close handler to close all remaining resources associated with this connection.void
void
boolean
protected org.slf4j.Logger
int
hashCode()
void
boolean
isActive()
<SEND extends com.google.protobuf.MessageLite,
RECEIVE extends com.google.protobuf.MessageLite>
voidsend
(RpcOutcomeListener<RECEIVE> outcomeListener, BitControl.RpcType rpcType, SEND protobufBody, Class<RECEIVE> clazz, io.netty.buffer.ByteBuf... dataBodies) <SEND extends com.google.protobuf.MessageLite,
RECEIVE extends com.google.protobuf.MessageLite>
voidsendUnsafe
(RpcOutcomeListener<RECEIVE> outcomeListener, BitControl.RpcType rpcType, SEND protobufBody, Class<RECEIVE> clazz, io.netty.buffer.ByteBuf... dataBodies) void
setSaslClient
(SaslClient saslClient) Methods inherited from class org.apache.drill.exec.rpc.AbstractServerConnection
changeHandlerTo, disposeSaslServer, finalizeSaslSession, getAllocator, getCurrentHandler, getSaslServer, initSaslServer, setEncryption, setMaxWrappedSize
Methods inherited from class org.apache.drill.exec.rpc.AbstractRemoteConnection
addSecurityHandlers, blockOnNotWritable, close, createNewRpcListener, getAndRemoveRpcOutcome, getChannel, getEncryptionCtxtString, getMaxWrappedSize, getName, getRemoteAddress, getWrapSizeLimit, inEventLoop, isEncryptionEnabled, recordRemoteFailure, setAutoRead, setWrapSizeLimit
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.drill.exec.rpc.ConnectionThrottle
setAutoRead
Methods inherited from interface org.apache.drill.exec.rpc.EncryptionContext
getEncryptionCtxtString, getMaxWrappedSize, getWrapSizeLimit, isEncryptionEnabled, setEncryption, setMaxWrappedSize, setWrapSizeLimit
Methods inherited from interface org.apache.drill.exec.rpc.RemoteConnection
addSecurityHandlers, blockOnNotWritable, close, createNewRpcListener, getAllocator, getAndRemoveRpcOutcome, getChannel, getName, getRemoteAddress, inEventLoop, recordRemoteFailure
-
Method Details
-
send
public <SEND extends com.google.protobuf.MessageLite,RECEIVE extends com.google.protobuf.MessageLite> void send(RpcOutcomeListener<RECEIVE> outcomeListener, BitControl.RpcType rpcType, SEND protobufBody, Class<RECEIVE> clazz, io.netty.buffer.ByteBuf... dataBodies) -
sendUnsafe
public <SEND extends com.google.protobuf.MessageLite,RECEIVE extends com.google.protobuf.MessageLite> void sendUnsafe(RpcOutcomeListener<RECEIVE> outcomeListener, BitControl.RpcType rpcType, SEND protobufBody, Class<RECEIVE> clazz, io.netty.buffer.ByteBuf... dataBodies) -
isActive
public boolean isActive()- Specified by:
isActive
in interfaceRemoteConnection
- Overrides:
isActive
in classAbstractRemoteConnection
-
hashCode
public int hashCode() -
equals
-
getLogger
protected org.slf4j.Logger getLogger()- Specified by:
getLogger
in classAbstractServerConnection<ControlConnection>
-
setSaslClient
- Specified by:
setSaslClient
in interfaceClientConnection
-
getSaslClient
- Specified by:
getSaslClient
in interfaceClientConnection
-
disposeSaslClient
public void disposeSaslClient()- Specified by:
disposeSaslClient
in interfaceClientConnection
-
channelClosed
Description copied from class:AbstractRemoteConnection
Called from the RpcBus's channel close handler to close all remaining resources associated with this connection. Ensures that any pending back-pressure items are also unblocked so they can be thrown away.- Specified by:
channelClosed
in interfaceRemoteConnection
- Overrides:
channelClosed
in classAbstractServerConnection<ControlConnection>
- Parameters:
ex
- The exception that caused the channel to close.
-
incConnectionCounter
public void incConnectionCounter()- Specified by:
incConnectionCounter
in classAbstractRemoteConnection
-
decConnectionCounter
public void decConnectionCounter()- Specified by:
decConnectionCounter
in classAbstractRemoteConnection
-