Examples of TerminType


Examples of com.alibaba.otter.shared.arbitrate.model.TerminEventData.TerminType

     * 1. 创建对应的termin节点,标志process为终结状态
     * </pre>
     */
    public void single(final TerminEventData data) {
        // 正向处理
        final TerminType type = data.getType();
        if (type.isNormal()) {
            Assert.notNull(data.getProcessId());
            normalTerminProcess.process(data); // 单独处理
        } else if (type.isWarning()) {
            warningTerminProcess.process(data); // warn单独处理,不需要关闭相关的pipeline
        } else {
            Channel channel = ArbitrateConfigUtils.getChannel(data.getPipelineId());

            if (data.getType().isRollback()) {
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.model.TerminEventData.TerminType

                print = new PrintWriter(log);
                while (true) {
                    try {
                        final TerminEventData eventData = arbitrateEventService.terminEvent().await(pipelineId);
                        // 可以使用异步处理
                        TerminType terminType = eventData.getType();
                        if (terminType.isNormal()) {
                            // 更新游标,判断是否发送ack给eromanga信息
                        } else {
                            // 出现异常了,rollback对应的数据
                        }
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.model.TerminEventData.TerminType

        }
    }

    public void single(TerminEventData data) {
        // 正向处理
        final TerminType type = data.getType();
        MemoryStageController stageController = ArbitrateFactory.getInstance(data.getPipelineId(),
                                                                             MemoryStageController.class);
        if (type.isNormal()) {
            Assert.notNull(data.getProcessId());
            stageController.offerTermin(data);
        } else if (type.isWarning()) {
            warningTerminProcess.process(data); // warn单独处理,不需要关闭相关的pipeline
        } else {
            // 内存版可以简化处理rollback/restart/shutdown模型,不需要进行process的termin操作处理
            Channel channel = ArbitrateConfigUtils.getChannel(data.getPipelineId());
            if (data.getType().isRollback()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.