Package org.apache.activemq.leveldb.replicated

Examples of org.apache.activemq.leveldb.replicated.SlaveLevelDBStore.stop()


        CountDownFuture f = asyncAddMessage(ms, "m1");
        assertTrue(f.await(1, TimeUnit.SECONDS));

        // If the slave goes offline, then updates should once again
        // not complete.
        slave.stop();

        f = asyncAddMessage(ms, "m2");
        assertFalse(f.await(2, TimeUnit.SECONDS));

        // Restart and the op should complete.
View Full Code Here


        slave = createSlave(master, slaveDir);
        slave.start();
        assertTrue(f.await(2, TimeUnit.SECONDS));

        master.stop();
        slave.stop();

    }

    private CountDownFuture asyncAddMessage(final MessageStore ms, final String body) {
        final CountDownFuture<Throwable> f = new CountDownFuture<Throwable>();
View Full Code Here

                    LOG.info("" + (100 * i / TOTAL) + "% done");
                }

                if (i == 250) {
                    slave1.start();
                    slave2.stop();
                    LOG.info("Checking: "+master.getDirectory());
                    assertEquals(expected_list, getMessages(ms));
                }

                String msgid = "m:" + j + ":" + i;
View Full Code Here

        final int TOTAL = 10;
        for (int i = 0; i < TOTAL; i++) {
            if (i == 8) {
                // Stop the fast slave so that we wait for the slow slave to
                // catch up..
                node3.stop();
            }

            String msgid = "m:" + ":" + i;
            addMessage(ms, msgid, playload);
            expected_list.add(msgid);
View Full Code Here

        CountDownFuture f = asyncAddMessage(ms, "m1");
        assertTrue(f.await(1, TimeUnit.SECONDS));

        // If the slave goes offline, then updates should once again
        // not complete.
        slave.stop();

        f = asyncAddMessage(ms, "m2");
        assertFalse(f.await(2, TimeUnit.SECONDS));

        // Restart and the op should complete.
View Full Code Here

        slave = createSlave(master, slaveDir);
        slave.start();
        assertTrue(f.await(2, TimeUnit.SECONDS));

        master.stop();
        slave.stop();

    }

    private CountDownFuture asyncAddMessage(final MessageStore ms, final String body) {
        final CountDownFuture<Throwable> f = new CountDownFuture<Throwable>();
View Full Code Here

                    LOG.info("" + (100 * i / TOTAL) + "% done");
                }

                if (i == 250) {
                    slave1.start();
                    slave2.stop();
                }

                String msgid = "m:" + j + ":" + i;
                addMessage(ms, msgid);
                expected_list.add(msgid);
View Full Code Here

        CountDownFuture f = asyncAddMessage(ms, "m1");
        assertTrue(f.await(1, TimeUnit.SECONDS));

        // If the slave goes offline, then updates should once again
        // not complete.
        slave.stop();

        f = asyncAddMessage(ms, "m2");
        assertFalse(f.await(2, TimeUnit.SECONDS));

        // Restart and the op should complete.
View Full Code Here

        slave = createSlave(master, slaveDir);
        slave.start();
        assertTrue(f.await(2, TimeUnit.SECONDS));

        master.stop();
        slave.stop();

    }

    private CountDownFuture asyncAddMessage(final MessageStore ms, final String body) {
        final CountDownFuture<Throwable> f = new CountDownFuture<Throwable>();
View Full Code Here

                    LOG.info("" + (100 * i / TOTAL) + "% done");
                }

                if (i == 250) {
                    slave1.start();
                    slave2.stop();
                    LOG.info("Checking: "+master.getDirectory());
                    assertEquals(expected_list, getMessages(ms));
                }

                String msgid = "m:" + j + ":" + i;
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.