Java Code Examples for com.alibaba.otter.canal.parse.ha.CanalHAController#stop()
The following examples show how to use
com.alibaba.otter.canal.parse.ha.CanalHAController#stop() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractCanalInstance.java From canal-1.1.3 with Apache License 2.0 | 6 votes |
protected void stopEventParserInternal(CanalEventParser eventParser) { if (eventParser instanceof AbstractEventParser) { AbstractEventParser abstractEventParser = (AbstractEventParser) eventParser; // 首先启动log position管理器 CanalLogPositionManager logPositionManager = abstractEventParser.getLogPositionManager(); if (logPositionManager.isStart()) { logPositionManager.stop(); } } if (eventParser instanceof MysqlEventParser) { MysqlEventParser mysqlEventParser = (MysqlEventParser) eventParser; CanalHAController haController = mysqlEventParser.getHaController(); if (haController.isStart()) { haController.stop(); } } }
Example 2
Source File: AbstractCanalInstance.java From canal with Apache License 2.0 | 6 votes |
protected void stopEventParserInternal(CanalEventParser eventParser) { if (eventParser instanceof AbstractEventParser) { AbstractEventParser abstractEventParser = (AbstractEventParser) eventParser; // 首先启动log position管理器 CanalLogPositionManager logPositionManager = abstractEventParser.getLogPositionManager(); if (logPositionManager.isStart()) { logPositionManager.stop(); } } if (eventParser instanceof MysqlEventParser) { MysqlEventParser mysqlEventParser = (MysqlEventParser) eventParser; CanalHAController haController = mysqlEventParser.getHaController(); if (haController.isStart()) { haController.stop(); } } }