Package org.apache.drill.exec.rpc
Class ReconnectingConnection<C extends ClientConnection,HS extends com.google.protobuf.MessageLite>
java.lang.Object
org.apache.drill.exec.rpc.ReconnectingConnection<C,HS>
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
ControlConnectionManager
,DataConnectionManager
public abstract class ReconnectingConnection<C extends ClientConnection,HS extends com.google.protobuf.MessageLite>
extends Object
implements Closeable
Manager all connections between two particular bits.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
Listens for connection closes and clears connection holder.class
Factory for close handlersclass
ReconnectingConnection.ConnectionListeningFuture<R extends com.google.protobuf.MessageLite,
E extends com.google.protobuf.Internal.EnumLite, M extends com.google.protobuf.MessageLite> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExternalConnection
(C connection) void
close()
protected abstract BasicClient<?,
C, HS, ?> <T extends com.google.protobuf.MessageLite,
E extends com.google.protobuf.Internal.EnumLite, M extends com.google.protobuf.MessageLite, R extends RpcCommand<T, C, E, M>>
voidrunCommand
(R cmd)
-
Constructor Details
-
ReconnectingConnection
-
-
Method Details
-
getNewClient
-
runCommand
public <T extends com.google.protobuf.MessageLite,E extends com.google.protobuf.Internal.EnumLite, void runCommandM extends com.google.protobuf.MessageLite, R extends RpcCommand<T, C, E, M>> (R cmd) -
getCloseHandlerCreator
-
addExternalConnection
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-