1 概述
Canal使用了组件生命周期管理的方式管理管理各个组件,有点类似于Tomcat,github上的原图:

每一个组件都实现了CanalLifeCycle接口,该接口定义如下:
public interface CanalLifeCycle {
void start();
void stop();
boolean isStart();
}
Canal主要组件之间的详细关系见后文
2 组件之间的关系
Canal是一个多角色的分布式系统,除了binlog的抽取外,还有大量生命周期控制类的代码,以start()为例,主要组件之间的详细关系如下图:

网友评论