private void succeed(Channel ch) throws IOException {
          if (connectionRegistryCall != null) {
            getConnectionRegistry(ch, connectionRegistryCall);
            return;
          }
          if (!useSasl) {
            // BufferCallBeforeInitHandler will call ctx.flush when receiving the
            // BufferCallEvent.success() event, so here we just use write for the below two messages
            NettyFutureUtils.safeWrite(ch, connectionHeaderPreamble.retainedDuplicate());
            NettyFutureUtils.safeWrite(ch, connectionHeaderWithLength.retainedDuplicate());
            established(ch);
          } else {
            saslNegotiate(ch);
          }
        }
RPC connection implementation based on netty.
<p/>
Most operations are executed in handlers. Netty handler is always executed in the same
thread(EventLoop) so no lock is needed.
<p/>
<strong>Implementation assumptions:</strong> All the private methods should be called in the
{@link #eventLoop} thread, otherwise there will be races.
@since 2.0.0
hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcConnection.java