Package org.apache.cassandra.net
Class OutboundConnectionInitiator<SuccessType extends OutboundConnectionInitiator.Result.Success>
- java.lang.Object
-
- org.apache.cassandra.net.OutboundConnectionInitiator<SuccessType>
-
public class OutboundConnectionInitiator<SuccessType extends OutboundConnectionInitiator.Result.Success> extends java.lang.Object
AChannelHandler
to execute the send-side of the internode handshake protocol. As soon as the handler is added to the channel viaChannelInboundHandler.channelActive(ChannelHandlerContext)
(which is only invoked if the underlying TCP connection was properly established), theHandshakeProtocol.Initiate
handshake is sent. SeeHandshakeProtocol
for full details.Upon completion of the handshake (on success or fail), the
resultPromise
is completed. SeeOutboundConnectionInitiator.Result
for details about the different result states.This class extends
ByteToMessageDecoder
, which is aChannelInboundHandler
, because this handler waits for the peer's handshake response (theHandshakeProtocol.Accept
of the internode messaging handshake protocol).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OutboundConnectionInitiator.Result<SuccessType extends OutboundConnectionInitiator.Result.Success>
The result of the handshake.static class
OutboundConnectionInitiator.SslFallbackConnectionType
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static io.netty.util.concurrent.Future<OutboundConnectionInitiator.Result<OutboundConnectionInitiator.Result.StreamingSuccess>>
initiateStreaming(io.netty.channel.EventLoop eventLoop, OutboundConnectionSettings settings, OutboundConnectionInitiator.SslFallbackConnectionType sslConnectionType)
Initiate a connection with the requested messaging version.
-
-
-
Method Detail
-
initiateStreaming
public static io.netty.util.concurrent.Future<OutboundConnectionInitiator.Result<OutboundConnectionInitiator.Result.StreamingSuccess>> initiateStreaming(io.netty.channel.EventLoop eventLoop, OutboundConnectionSettings settings, OutboundConnectionInitiator.SslFallbackConnectionType sslConnectionType)
Initiate a connection with the requested messaging version. if the other node supports a newer version, or doesn't support this version, we will fail to connect and try again with the version they reported The returnedFuture
is guaranteed to be completed on the supplied eventLoop.
-
-