Examples of releaseMainstem()


Examples of com.alibaba.otter.shared.arbitrate.impl.setl.monitor.MainstemMonitor.releaseMainstem()

        } catch (InterruptedException e) {
            want.fail();
        }

        ArbitrateFactory.destory(pipelineId);
        mainstemMonitor.releaseMainstem();
    }

    @Test
    public void testRelease() {
        MainstemMonitor mainstemMonitor = ArbitrateFactory.getInstance(pipelineId, MainstemMonitor.class);
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.monitor.MainstemMonitor.releaseMainstem()

    public void testRelease() {
        MainstemMonitor mainstemMonitor = ArbitrateFactory.getInstance(pipelineId, MainstemMonitor.class);
        boolean running = mainstemMonitor.check();
        want.bool(running).is(true);

        boolean release = mainstemMonitor.releaseMainstem();// 模拟一次断网,
        want.bool(release).is(true);

        long start = System.currentTimeMillis();
        try {
            mainstemMonitor.waitForActive();
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.monitor.MainstemMonitor.releaseMainstem()

        } catch (InterruptedException e) {
            want.fail();
        }
        want.number(System.currentTimeMillis() - start).isLe(1000L);
        ArbitrateFactory.destory(pipelineId);
        mainstemMonitor.releaseMainstem();
    }

    @Test
    public void testManualRelease() {
        MainstemMonitor mainstemMonitor = ArbitrateFactory.getInstance(pipelineId, MainstemMonitor.class);
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.monitor.MainstemMonitor.releaseMainstem()

        } catch (InterruptedException e) {
            want.fail();
        }
        want.number(System.currentTimeMillis() - start).isGe(4000L);
        ArbitrateFactory.destory(pipelineId);
        mainstemMonitor.releaseMainstem();
    }

    /**
     * 手工触发一次主备切换
     */
 
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.monitor.MainstemMonitor.releaseMainstem()

    /**
     * 释放mainStem的节点,重新选择工作节点
     */
    public void release(Long pipelineId) {
        MainstemMonitor mainstemMonitor = ArbitrateFactory.getInstance(pipelineId, MainstemMonitor.class);
        mainstemMonitor.releaseMainstem();
    }

}
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.