Search in sources :

Example 1 with UOffLineListener

use of com.actiontech.dble.config.loader.ucoreprocess.listen.UOffLineListener in project dble by actiontech.

the class UcoreToXml method loadKVtoFile.

public static void loadKVtoFile() {
    try {
        // create a new listener to the ucore config change
        listener = new UcoreClearKeyListener();
        XmlProcessBase xmlProcess = new XmlProcessBase();
        listener.init();
        // add all loader into listener map list
        new UXmlRuleLoader(xmlProcess, listener);
        new UXmlSchemaLoader(xmlProcess, listener);
        new UXmlServerLoader(xmlProcess, listener);
        new UXmlEhcachesLoader(xmlProcess, listener);
        new UPropertySequenceLoader(listener);
        xmlProcess.initJaxbClass();
        // add listener to watch the Prefix of the keys
        new UConfigStatusResponse(listener);
        new UBinlogPauseStatusResponse(listener);
        ddlListener = new UcoreSingleKeyListener(UcorePathUtil.getDDLPath() + SEPARATOR, new UDdlChildResponse());
        viewListener = new UcoreSingleKeyListener(UcorePathUtil.getViewChangePath() + SEPARATOR, new UViewChildResponse());
        onlineListener = new UOffLineListener();
        listener.initForXml();
        Thread thread = new Thread(listener);
        thread.start();
        ddlListener.init();
        Thread thread2 = new Thread(ddlListener);
        thread2.start();
        viewListener.init();
        Thread thread3 = new Thread(viewListener);
        thread3.start();
        onlineListener.init();
        Thread thread4 = new Thread(onlineListener);
        thread4.start();
    } catch (Exception e) {
        e.printStackTrace();
    }
}
Also used : XmlProcessBase(com.actiontech.dble.config.loader.zkprocess.parse.XmlProcessBase) UOffLineListener(com.actiontech.dble.config.loader.ucoreprocess.listen.UOffLineListener) UcoreSingleKeyListener(com.actiontech.dble.config.loader.ucoreprocess.listen.UcoreSingleKeyListener) UcoreClearKeyListener(com.actiontech.dble.config.loader.ucoreprocess.listen.UcoreClearKeyListener)

Aggregations

UOffLineListener (com.actiontech.dble.config.loader.ucoreprocess.listen.UOffLineListener)1 UcoreClearKeyListener (com.actiontech.dble.config.loader.ucoreprocess.listen.UcoreClearKeyListener)1 UcoreSingleKeyListener (com.actiontech.dble.config.loader.ucoreprocess.listen.UcoreSingleKeyListener)1 XmlProcessBase (com.actiontech.dble.config.loader.zkprocess.parse.XmlProcessBase)1