当前位置: 首页>>代码示例>>Java>>正文


Java XMLFileLoaderPath.setXmlPath方法代码示例

本文整理汇总了Java中com.alibaba.cobar.manager.dao.xml.XMLFileLoaderPath.setXmlPath方法的典型用法代码示例。如果您正苦于以下问题:Java XMLFileLoaderPath.setXmlPath方法的具体用法?Java XMLFileLoaderPath.setXmlPath怎么用?Java XMLFileLoaderPath.setXmlPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.alibaba.cobar.manager.dao.xml.XMLFileLoaderPath的用法示例。


在下文中一共展示了XMLFileLoaderPath.setXmlPath方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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

示例8: 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


注:本文中的com.alibaba.cobar.manager.dao.xml.XMLFileLoaderPath.setXmlPath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。