當前位置: 首頁>>代碼示例>>Java>>正文


Java XMLFileLoaderPath類代碼示例

本文整理匯總了Java中com.alibaba.cobar.manager.dao.xml.XMLFileLoaderPath的典型用法代碼示例。如果您正苦於以下問題:Java XMLFileLoaderPath類的具體用法?Java XMLFileLoaderPath怎麽用?Java XMLFileLoaderPath使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


XMLFileLoaderPath類屬於com.alibaba.cobar.manager.dao.xml包,在下文中一共展示了XMLFileLoaderPath類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initData

import com.alibaba.cobar.manager.dao.xml.XMLFileLoaderPath; //導入依賴的package包/類
@Before
public void initData() {
    Assert.assertNotNull(xmlPath);

    xmlFileLoader = new XMLFileLoaderPath();
    xmlFileLoader.setXmlPath(xmlPath);
    cobarDao = new CobarDAOImple();
    cobarDao.setXmlFileLoader(xmlFileLoader);
    cobarXmlPath = xmlPath + System.getProperty("file.separator") + "cobar.xml";
    XmlFile xmlFile = new XmlFile(cobarXmlPath, "cobars");
    try {
        xmlFile.init();
    } catch (IOException e) {
        logger.error(e.getMessage(), e);
        Assert.fail();
    }
    read();
}
 
開發者ID:loye168,項目名稱:tddl5,代碼行數:19,代碼來源:CobarDaoTest.java

示例2: initData

import com.alibaba.cobar.manager.dao.xml.XMLFileLoaderPath; //導入依賴的package包/類
@Before
public void initData() {
    Assert.assertNotNull(xmlPath);
    xmlFileLoader = new XMLFileLoaderPath();
    xmlFileLoader.setXmlPath(xmlPath);
    clusterDao = new ClusterDAOImple();
    clusterDao.setXmlFileLoader(xmlFileLoader);
    clusterXmlPath = xmlPath + System.getProperty("file.separator") + "cluster.xml";
    XmlFile xmlFile = new XmlFile(clusterXmlPath, "clusters");
    try {
        xmlFile.init();
    } catch (IOException e) {
        logger.error(e.getMessage(), e);
        Assert.fail();
    }
    read();
}
 
開發者ID:loye168,項目名稱:tddl5,代碼行數:18,代碼來源:ClusterDaoTest.java

示例3: initData

import com.alibaba.cobar.manager.dao.xml.XMLFileLoaderPath; //導入依賴的package包/類
@Before
public void initData() {
    Assert.assertNotNull(xmlPath);
    userDao = new UserDAOImple();
    xmlFileLoader = new XMLFileLoaderPath();
    xmlFileLoader.setXmlPath(xmlPath);
    userDao.setXmlFileLoader(xmlFileLoader);
    userXmlPath = xmlPath + System.getProperty("file.separator") + "user.xml";
    XmlFile xmlFile = new XmlFile(userXmlPath, "users");
    try {
        xmlFile.init();
    } catch (IOException e) {
        logger.error(e.getMessage(), e);
        Assert.fail();
    }
    read();
}
 
開發者ID:loye168,項目名稱:tddl5,代碼行數:18,代碼來源:UserDaoTest.java

示例4: initData

import com.alibaba.cobar.manager.dao.xml.XMLFileLoaderPath; //導入依賴的package包/類
@Before
public void initData() {
    Assert.assertNotNull(xmlPath);
    propertyXmlPath = xmlPath + System.getProperty("file.separator") + "property.xml";
    xmlFileLoader = new XMLFileLoaderPath();
    xmlFileLoader.setXmlPath(xmlPath);
    propertyDao = new PropertyDAOImple();
    propertyDao.setXmlFileLoader(xmlFileLoader);
    XmlFile xmlFile = new XmlFile(propertyXmlPath, "pro");
    try {
        xmlFile.init();
    } catch (Exception e) {
        logger.error(e.getMessage(), e);
        Assert.fail();
    }

    read();
}
 
開發者ID:loye168,項目名稱:tddl5,代碼行數:19,代碼來源:PropertyDaoTest.java

示例5: XmlFile

import com.alibaba.cobar.manager.dao.xml.XMLFileLoaderPath; //導入依賴的package包/類
public XmlFile(String path){
    xmlPath = path;
    Assert.assertNotNull(xmlPath);
    xmlFileLoader = new XMLFileLoaderPath();
    xmlFileLoader.setXmlPath(xmlPath);
}
 
開發者ID:loye168,項目名稱:tddl5,代碼行數:7,代碼來源:XmlFile.java

示例6: main

import com.alibaba.cobar.manager.dao.xml.XMLFileLoaderPath; //導入依賴的package包/類
public static void main(String[] args) throws Exception {
    String xmlpath = "./src/main/resources/";
    CobarAccesser accesser = new CobarAccesser();
    XmlAccesser xmlAccesser = new XmlAccesser();
    XMLFileLoaderPath xmlFileLoader = new XMLFileLoaderPath();
    xmlFileLoader.setXmlPath(xmlpath);

    ClusterDAOImple cluster = new ClusterDAOImple();
    cluster.setXmlFileLoader(xmlFileLoader);
    cluster.afterPropertiesSet();

    CobarDAOImple cobar = new CobarDAOImple();
    cobar.setXmlFileLoader(xmlFileLoader);
    cobar.afterPropertiesSet();

    xmlAccesser.setClusterDAO(cluster);
    xmlAccesser.setCobarDAO(cobar);

    accesser.setXmlAccesser(xmlAccesser);

    AdapterDelegate res = new AdapterDelegate();
    accesser.setCobarAdapterDelegate(res);

    CobarAdapterDAO perf = accesser.getAccesser(1L);
    String version = perf.getVersion();
    System.out.println(version);

    ServerStatus ss = perf.getServerStatus();
    System.out.println(ss.getMaxMemory());
    System.out.println(ss.getStatus());
    System.out.println(ss.getTotalMemory());
    System.out.println(ss.getUptime());
    System.out.println(ss.getUsedMemory());
    System.out.println(ss.getReloadTime());
    System.out.println(ss.getRollbackTime());

    List<String> databases = perf.listDataBases();
    for (String s : databases) {
        System.out.println(s);
    }

    // perf.reloadConfig();
    // perf.rollbackConfig();

    // int num = perf.switchDataNode("circe,cndb,dubbo,napoli", 0);
    // System.out.println("num: " + num);

    // int num = perf.stopHeartbeat("circe,cndb,dubbo,napoli", -10);
    // System.out.println("num: " + num);

}
 
開發者ID:loye168,項目名稱:tddl5,代碼行數:52,代碼來源:CobarAccessTest.java

示例7: main

import com.alibaba.cobar.manager.dao.xml.XMLFileLoaderPath; //導入依賴的package包/類
public static void main(String[] args) {

        XMLFileLoaderPath p = new XMLFileLoaderPath();
        System.out.println(p.getFilePath());
    }
 
開發者ID:loye168,項目名稱:tddl5,代碼行數:6,代碼來源:TestXMLFileLoader.java

示例8: XmlFile

import com.alibaba.cobar.manager.dao.xml.XMLFileLoaderPath; //導入依賴的package包/類
public XmlFile(String path) {
    xmlPath = path;
    Assert.assertNotNull(xmlPath);
    xmlFileLoader = new XMLFileLoaderPath();
    xmlFileLoader.setXmlPath(xmlPath);
}
 
開發者ID:alibaba,項目名稱:cobar,代碼行數:7,代碼來源:XmlFile.java

示例9: main

import com.alibaba.cobar.manager.dao.xml.XMLFileLoaderPath; //導入依賴的package包/類
public static void main(String[] args) throws Exception {
    String xmlpath = "./src/main/resources/";
    CobarAccesser accesser = new CobarAccesser();
    XmlAccesser xmlAccesser = new XmlAccesser();
    XMLFileLoaderPath xmlFileLoader = new XMLFileLoaderPath();
    xmlFileLoader.setXmlPath(xmlpath);

    ClusterDAOImple cluster = new ClusterDAOImple();
    cluster.setXmlFileLoader(xmlFileLoader);
    cluster.afterPropertiesSet();

    CobarDAOImple cobar = new CobarDAOImple();
    cobar.setXmlFileLoader(xmlFileLoader);
    cobar.afterPropertiesSet();

    xmlAccesser.setClusterDAO(cluster);
    xmlAccesser.setCobarDAO(cobar);

    accesser.setXmlAccesser(xmlAccesser);

    AdapterDelegate res = new AdapterDelegate();
    accesser.setCobarAdapterDelegate(res);

    CobarAdapterDAO perf = accesser.getAccesser(1L);
    String version = perf.getVersion();
    System.out.println(version);

    ServerStatus ss = perf.getServerStatus();
    System.out.println(ss.getMaxMemory());
    System.out.println(ss.getStatus());
    System.out.println(ss.getTotalMemory());
    System.out.println(ss.getUptime());
    System.out.println(ss.getUsedMemory());
    System.out.println(ss.getReloadTime());
    System.out.println(ss.getRollbackTime());

    List<String> databases = perf.listDataBases();
    for (String s : databases) {
        System.out.println(s);
    }

    //        perf.reloadConfig();
    //        perf.rollbackConfig();

    //        int num = perf.switchDataNode("circe,cndb,dubbo,napoli", 0);
    //        System.out.println("num: " + num);

    //        int num = perf.stopHeartbeat("circe,cndb,dubbo,napoli", -10);
    //        System.out.println("num: " + num);

}
 
開發者ID:alibaba,項目名稱:cobar,代碼行數:52,代碼來源:CobarAccessTest.java

示例10: main

import com.alibaba.cobar.manager.dao.xml.XMLFileLoaderPath; //導入依賴的package包/類
public static void main(String[] args) {
    
    XMLFileLoaderPath p = new XMLFileLoaderPath();
    System.out.println(p.getFilePath());
}
 
開發者ID:alibaba,項目名稱:cobar,代碼行數:6,代碼來源:TestXMLFileLoader.java


注:本文中的com.alibaba.cobar.manager.dao.xml.XMLFileLoaderPath類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。