use of com.actiontech.dble.server.OfflineStatusListener in project dble by actiontech.
the class ZktoXmlMain method initLocalConfFromZK.
private static void initLocalConfFromZK(ZookeeperProcessListen zkListen, CuratorFramework zkConn) throws Exception {
ConfigStatusListener confListener = new ConfigStatusListener(zkListen, zkConn);
XmlProcessBase xmlProcess = new XmlProcessBase();
// load schema
new SchemaszkToxmlLoader(zkListen, zkConn, xmlProcess, confListener);
// load server
new ServerzkToxmlLoader(zkListen, zkConn, xmlProcess, confListener);
// load rule
new RuleszkToxmlLoader(zkListen, zkConn, xmlProcess, confListener);
// load sequence
new SequenceTopropertiesLoader(zkListen, zkConn);
// load ehcache
new EcacheszkToxmlLoader(zkListen, zkConn, xmlProcess);
ZKUtils.addChildPathCache(KVPathUtil.getOnlinePath(), new OfflineStatusListener());
// transform bindata data to local file
ZKUtils.addChildPathCache(KVPathUtil.getBinDataPath(), new BinDataPathChildrenCacheListener());
new BinlogPauseStatusListener(zkListen, zkConn);
// init xml
xmlProcess.initJaxbClass();
// notify all
zkListen.initAllNode();
zkListen.clearInited();
}
Aggregations