Examples of waitForProcess()


Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.SelectStageListener.waitForProcess()

            initProcess();
            // initProcessIds.add(p1);
            SelectStageListener select = new SelectStageListener(pipelineId);
            sleep();

            Long p2 = select.waitForProcess();
            Long p3 = select.waitForProcess();
            Long p4 = select.waitForProcess();
            initProcessIds.add(p2);
            initProcessIds.add(p3);
            initProcessIds.add(p4);
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.SelectStageListener.waitForProcess()

            // initProcessIds.add(p1);
            SelectStageListener select = new SelectStageListener(pipelineId);
            sleep();

            Long p2 = select.waitForProcess();
            Long p3 = select.waitForProcess();
            Long p4 = select.waitForProcess();
            initProcessIds.add(p2);
            initProcessIds.add(p3);
            initProcessIds.add(p4);
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.SelectStageListener.waitForProcess()

            SelectStageListener select = new SelectStageListener(pipelineId);
            sleep();

            Long p2 = select.waitForProcess();
            Long p3 = select.waitForProcess();
            Long p4 = select.waitForProcess();
            initProcessIds.add(p2);
            initProcessIds.add(p3);
            initProcessIds.add(p4);

            StageMonitor monitor = ArbitrateFactory.getInstance(pipelineId, StageMonitor.class);
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.SelectStageListener.waitForProcess()

    public void testProcess_dymanic() {
        final List<Long> initProcessIds = new ArrayList<Long>();
        try {
            initProcess();
            SelectStageListener select = new SelectStageListener(pipelineId);
            final Long p2 = select.waitForProcess();
            final Long p3 = select.waitForProcess();

            final CountDownLatch count = new CountDownLatch(1);
            ExecutorService executor = Executors.newCachedThreadPool();
            executor.submit(new Runnable() {
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.SelectStageListener.waitForProcess()

        final List<Long> initProcessIds = new ArrayList<Long>();
        try {
            initProcess();
            SelectStageListener select = new SelectStageListener(pipelineId);
            final Long p2 = select.waitForProcess();
            final Long p3 = select.waitForProcess();

            final CountDownLatch count = new CountDownLatch(1);
            ExecutorService executor = Executors.newCachedThreadPool();
            executor.submit(new Runnable() {
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.SelectStageListener.waitForProcess()

                    destoryProcess(p3);
                    count.countDown();
                }
            });

            Long p4 = select.waitForProcess();
            Long p5 = select.waitForProcess();
            initProcessIds.add(p4);
            initProcessIds.add(p5);

            sleep();
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.SelectStageListener.waitForProcess()

                    count.countDown();
                }
            });

            Long p4 = select.waitForProcess();
            Long p5 = select.waitForProcess();
            initProcessIds.add(p4);
            initProcessIds.add(p5);

            sleep();
            StageMonitor monitor = ArbitrateFactory.getInstance(pipelineId, StageMonitor.class);
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.SelectStageListener.waitForProcess()

        PermitMonitor permitMonitor = ArbitrateFactory.getInstance(pipelineId, PermitMonitor.class);
        permitMonitor.waitForPermit();// 阻塞等待授权

        SelectStageListener selectStageListener = ArbitrateFactory.getInstance(pipelineId, SelectStageListener.class);
        Long processId = selectStageListener.waitForProcess(); // 符合条件的processId

        ChannelStatus status = permitMonitor.getChannelPermit();
        if (status.isStart()) {// 即时查询一下当前的状态,状态随时可能会变

            try {
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.TransformStageListener.waitForProcess()

            List<String> p4Stages = Arrays.asList(ArbitrateConstants.NODE_SELECTED, ArbitrateConstants.NODE_EXTRACTED);
            stages.put(p4, p4Stages);

            // 进行验证
            TransformStageListener transform = new TransformStageListener(pipelineId);
            Long processId = transform.waitForProcess();
            want.number(processId).isEqualTo(p2);

            // 验证下process信息
            StageMonitor monitor = ArbitrateFactory.getInstance(pipelineId, StageMonitor.class);
            List<Long> processIds = monitor.getCurrentProcessIds();
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.zookeeper.monitor.TransformStageListener.waitForProcess()

            List<String> p4Stages = Lists.newArrayList();
            stages.put(p4, p4Stages);

            sleep();// sleep一下,等待数据同步
            // 进行验证
            Long processId = transform.waitForProcess();
            want.number(processId).isEqualTo(p3);

            // 验证下process信息
            StageMonitor monitor = ArbitrateFactory.getInstance(pipelineId, StageMonitor.class);
            List<Long> processIds = monitor.getCurrentProcessIds();
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.