Search in sources :

Example 1 with OfflineStatusListener

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();
}
Also used : XmlProcessBase(com.actiontech.dble.config.loader.zkprocess.parse.XmlProcessBase) OfflineStatusListener(com.actiontech.dble.server.OfflineStatusListener)

Aggregations

XmlProcessBase (com.actiontech.dble.config.loader.zkprocess.parse.XmlProcessBase)1 OfflineStatusListener (com.actiontech.dble.server.OfflineStatusListener)1