Package com.alibaba.otter.manager.biz.config.node.dal.dataobject

Examples of com.alibaba.otter.manager.biz.config.node.dal.dataobject.NodeDO


        transactionTemplate.execute(new TransactionCallbackWithoutResult() {

            protected void doInTransactionWithoutResult(TransactionStatus status) {

                try {
                    NodeDO nodeDo = modelToDo(node);
                    nodeDo.setId(0L);
                    if (!nodeDao.checkUnique(nodeDo)) {
                        String exceptionCause = "exist the same repeat node in the database.";
                        logger.warn("WARN ## " + exceptionCause);
                        throw new RepeatConfigureException(exceptionCause);
                    }
View Full Code Here


        transactionTemplate.execute(new TransactionCallbackWithoutResult() {

            protected void doInTransactionWithoutResult(TransactionStatus status) {

                try {
                    NodeDO nodeDo = modelToDo(node);
                    if (nodeDao.checkUnique(nodeDo)) {
                        nodeDao.update(nodeDo);
                    } else {
                        String exceptionCause = "exist the same repeat node in the database.";
                        logger.warn("WARN ## " + exceptionCause);
View Full Code Here

     *
     * @param node
     * @return NodeDO
     */
    private NodeDO modelToDo(Node node) {
        NodeDO nodeDo = new NodeDO();
        try {
            nodeDo.setId(node.getId());
            nodeDo.setIp(node.getIp());
            nodeDo.setName(node.getName());
            nodeDo.setPort(node.getPort());
            nodeDo.setDescription(node.getDescription());
            nodeDo.setStatus(node.getStatus());
            nodeDo.setParameters(node.getParameters());
            nodeDo.setGmtCreate(node.getGmtCreate());
            nodeDo.setGmtModified(node.getGmtModified());
        } catch (Exception e) {
            logger.error("ERROR ## change the node Model to Do has an exception");
            throw new ManagerException(e);
        }
        return nodeDo;
View Full Code Here

            {
                nodeDao.listAll();
                List<NodeDO> nodeDos = new ArrayList<NodeDO>();
                for (int i = 0; i < 10; i++) {
                    NodeDO nodeDo = new NodeDO();
                    nodeDo.setId(Long.valueOf(1));
                    nodeDo.setIp("127.0.0.1");
                    nodeDos.add(nodeDo);
                }
                returns(nodeDos);

                arbitrateManageService.nodeEvent();
View Full Code Here

TOP

Related Classes of com.alibaba.otter.manager.biz.config.node.dal.dataobject.NodeDO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.