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 TypeMethodDescriptionvoidCalled from the RpcBus's channel close handler to close all remaining resources associated with this connection.voidvoidbooleanprotected org.slf4j.LoggerinthashCode()voidbooleanisActive()<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) voidsetSaslClient(SaslClient saslClient) Methods inherited from class org.apache.drill.exec.rpc.AbstractServerConnection
changeHandlerTo, disposeSaslServer, finalizeSaslSession, getAllocator, getCurrentHandler, getSaslServer, initSaslServer, setEncryption, setMaxWrappedSizeMethods inherited from class org.apache.drill.exec.rpc.AbstractRemoteConnection
addSecurityHandlers, blockOnNotWritable, close, createNewRpcListener, getAndRemoveRpcOutcome, getChannel, getEncryptionCtxtString, getMaxWrappedSize, getName, getRemoteAddress, getWrapSizeLimit, inEventLoop, isEncryptionEnabled, recordRemoteFailure, setAutoRead, setWrapSizeLimitMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.drill.exec.rpc.ConnectionThrottle
setAutoReadMethods inherited from interface org.apache.drill.exec.rpc.EncryptionContext
getEncryptionCtxtString, getMaxWrappedSize, getWrapSizeLimit, isEncryptionEnabled, setEncryption, setMaxWrappedSize, setWrapSizeLimitMethods 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:
isActivein interfaceRemoteConnection- Overrides:
isActivein classAbstractRemoteConnection
-
hashCode
public int hashCode() -
equals
-
getLogger
protected org.slf4j.Logger getLogger()- Specified by:
getLoggerin classAbstractServerConnection<ControlConnection>
-
setSaslClient
- Specified by:
setSaslClientin interfaceClientConnection
-
getSaslClient
- Specified by:
getSaslClientin interfaceClientConnection
-
disposeSaslClient
public void disposeSaslClient()- Specified by:
disposeSaslClientin interfaceClientConnection
-
channelClosed
Description copied from class:AbstractRemoteConnectionCalled 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:
channelClosedin interfaceRemoteConnection- Overrides:
channelClosedin classAbstractServerConnection<ControlConnection>- Parameters:
ex- The exception that caused the channel to close.
-
incConnectionCounter
public void incConnectionCounter()- Specified by:
incConnectionCounterin classAbstractRemoteConnection
-
decConnectionCounter
public void decConnectionCounter()- Specified by:
decConnectionCounterin classAbstractRemoteConnection
-