Search in sources :

Example 1 with UcoreClearKeyListener

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

the class XmltoUcore method initFileToUcore.

public static void initFileToUcore() throws Exception {
    UcoreClearKeyListener ucoreListen = new UcoreClearKeyListener();
    XmlProcessBase xmlProcess = new XmlProcessBase();
    new UXmlRuleLoader(xmlProcess, ucoreListen);
    new UXmlServerLoader(xmlProcess, ucoreListen);
    new UXmlSchemaLoader(xmlProcess, ucoreListen);
    new UXmlEhcachesLoader(xmlProcess, ucoreListen);
    new UPropertySequenceLoader(ucoreListen);
    xmlProcess.initJaxbClass();
    ucoreListen.initAllNode();
}
Also used : XmlProcessBase(com.actiontech.dble.config.loader.zkprocess.parse.XmlProcessBase) UcoreClearKeyListener(com.actiontech.dble.config.loader.ucoreprocess.listen.UcoreClearKeyListener)

Example 2 with UcoreClearKeyListener

use of com.actiontech.dble.config.loader.ucoreprocess.listen.UcoreClearKeyListener 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

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