test_class.declarator: channel
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Channel channel;
test_class.type: Channel
test_class.var_name: channel
test_class.declarator: pipeline
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ChannelPipeline pipeline;
test_class.type: ChannelPipeline
test_class.var_name: pipeline
test_class.declarator: mysqlClient
test_class.modifier: private
test_class.original_string: private MySQLClient mysqlClient;
test_class.type: MySQLClient
test_class.var_name: mysqlClient
test_class.file: shardingsphere-scaling/shardingsphere-scaling-mysql/src/test/java/org/apache/shardingsphere/scaling/mysql/client/MySQLClientTest.java
test_class.identifier: MySQLClientTest
test_case.body: @Test
      public void assertConnect() throws NoSuchFieldException, IllegalAccessException {
          ServerInfo expected = new ServerInfo();
          mockChannelResponse(expected);
          mysqlClient.connect();
          ServerInfo actual = ReflectionUtil.getFieldValueFromClass(mysqlClient, "serverInfo", ServerInfo.class);
          assertThat(actual, is(expected));
      }
test_case.class_method_signature: MySQLClientTest.assertConnect()
test_case.full_signature: @Test public void assertConnect()
test_case.identifier: assertConnect
test_case.invocations: mockChannelResponse connect getFieldValueFromClass assertThat is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertConnect()
focal_class.declarator: connectInfo
focal_class.modifier: private final
focal_class.original_string: private final ConnectInfo connectInfo;
focal_class.type: ConnectInfo
focal_class.var_name: connectInfo
focal_class.declarator: eventLoopGroup
focal_class.modifier: private
focal_class.original_string: private EventLoopGroup eventLoopGroup;
focal_class.type: EventLoopGroup
focal_class.var_name: eventLoopGroup
focal_class.declarator: channel
focal_class.modifier: private
focal_class.original_string: private Channel channel;
focal_class.type: Channel
focal_class.var_name: channel
focal_class.declarator: responseCallback
focal_class.modifier: private
focal_class.original_string: private Promise<Object> responseCallback;
focal_class.type: Promise<Object>
focal_class.var_name: responseCallback
focal_class.declarator: blockingEventQueue = new ArrayBlockingQueue<>(10000)
focal_class.modifier: private final
focal_class.original_string: private final ArrayBlockingQueue<AbstractBinlogEvent> blockingEventQueue = new ArrayBlockingQueue<>(10000);
focal_class.type: ArrayBlockingQueue<AbstractBinlogEvent>
focal_class.var_name: blockingEventQueue
focal_class.declarator: serverInfo
focal_class.modifier: private
focal_class.original_string: private ServerInfo serverInfo;
focal_class.type: ServerInfo
focal_class.var_name: serverInfo
focal_class.file: shardingsphere-scaling/shardingsphere-scaling-mysql/src/main/java/org/apache/shardingsphere/scaling/mysql/client/MySQLClient.java
focal_class.identifier: MySQLClient
focal_class.class_method_signature: MySQLClient.connect()
focal_class.full_signature: public synchronized void connect()
focal_class.identifier: connect
focal_class.modifiers: public synchronized
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void connect()
focal_class.class_method_signature: MySQLClient.execute(final String queryString)
focal_class.full_signature: public synchronized boolean execute(final String queryString)
focal_class.identifier: execute
focal_class.modifiers: public synchronized
focal_class.parameters: (final String queryString)
focal_class.return: boolean
focal_class.signature: boolean execute(final String queryString)
focal_class.class_method_signature: MySQLClient.executeUpdate(final String queryString)
focal_class.full_signature: public synchronized int executeUpdate(final String queryString)
focal_class.identifier: executeUpdate
focal_class.modifiers: public synchronized
focal_class.parameters: (final String queryString)
focal_class.return: int
focal_class.signature: int executeUpdate(final String queryString)
focal_class.class_method_signature: MySQLClient.executeQuery(final String queryString)
focal_class.full_signature: public synchronized InternalResultSet executeQuery(final String queryString)
focal_class.identifier: executeQuery
focal_class.modifiers: public synchronized
focal_class.parameters: (final String queryString)
focal_class.return: InternalResultSet
focal_class.signature: InternalResultSet executeQuery(final String queryString)
focal_class.class_method_signature: MySQLClient.subscribe(final String binlogFileName, final long binlogPosition)
focal_class.full_signature: public synchronized void subscribe(final String binlogFileName, final long binlogPosition)
focal_class.identifier: subscribe
focal_class.modifiers: public synchronized
focal_class.parameters: (final String binlogFileName, final long binlogPosition)
focal_class.return: void
focal_class.signature: void subscribe(final String binlogFileName, final long binlogPosition)
focal_class.class_method_signature: MySQLClient.initDumpConnectSession()
focal_class.full_signature: private void initDumpConnectSession()
focal_class.identifier: initDumpConnectSession
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void initDumpConnectSession()
focal_class.class_method_signature: MySQLClient.registerSlave()
focal_class.full_signature: private void registerSlave()
focal_class.identifier: registerSlave
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void registerSlave()
focal_class.class_method_signature: MySQLClient.queryChecksumLength()
focal_class.full_signature: private int queryChecksumLength()
focal_class.identifier: queryChecksumLength
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int queryChecksumLength()
focal_class.class_method_signature: MySQLClient.dumpBinlog(final String binlogFileName, final long binlogPosition, final int checksumLength)
focal_class.full_signature: private void dumpBinlog(final String binlogFileName, final long binlogPosition, final int checksumLength)
focal_class.identifier: dumpBinlog
focal_class.modifiers: private
focal_class.parameters: (final String binlogFileName, final long binlogPosition, final int checksumLength)
focal_class.return: void
focal_class.signature: void dumpBinlog(final String binlogFileName, final long binlogPosition, final int checksumLength)
focal_class.class_method_signature: MySQLClient.poll()
focal_class.full_signature: public synchronized AbstractBinlogEvent poll()
focal_class.identifier: poll
focal_class.modifiers: public synchronized
focal_class.parameters: ()
focal_class.return: AbstractBinlogEvent
focal_class.signature: AbstractBinlogEvent poll()
focal_class.class_method_signature: MySQLClient.waitExpectedResponse(final Class<T> type)
focal_class.full_signature: @SuppressWarnings("unchecked") private T waitExpectedResponse(final Class<T> type)
focal_class.identifier: waitExpectedResponse
focal_class.modifiers: @SuppressWarnings("unchecked") private
focal_class.parameters: (final Class<T> type)
focal_class.return: T
focal_class.signature: T waitExpectedResponse(final Class<T> type)
focal_method.body: public synchronized void connect() {
          eventLoopGroup = new NioEventLoopGroup(1);
          responseCallback = new DefaultPromise<>(eventLoopGroup.next());
          channel = new Bootstrap()
                  .group(eventLoopGroup)
                  .channel(NioSocketChannel.class)
                  .option(ChannelOption.AUTO_READ, true)
                  .handler(new ChannelInitializer<SocketChannel>() {
                      @Override
                      protected void initChannel(final SocketChannel socketChannel) {
                          socketChannel.pipeline().addLast(new PacketCodec(new MySQLPacketCodecEngine()));
                          socketChannel.pipeline().addLast(new MySQLCommandPacketDecoder());
                          socketChannel.pipeline().addLast(new MySQLNegotiateHandler(connectInfo.getUsername(), connectInfo.getPassword(), responseCallback));
                          socketChannel.pipeline().addLast(new MySQLCommandResponseHandler());
                      }
                  }).connect(connectInfo.getHost(), connectInfo.getPort()).channel();
          serverInfo = waitExpectedResponse(ServerInfo.class);
      }
focal_method.class_method_signature: MySQLClient.connect()
focal_method.full_signature: public synchronized void connect()
focal_method.identifier: connect
focal_method.invocations: next channel connect handler option channel group addLast pipeline addLast pipeline addLast pipeline getUsername getPassword addLast pipeline getHost getPort waitExpectedResponse
focal_method.modifiers: public synchronized
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void connect()