Package org.jgroups.util

Examples of org.jgroups.util.RetransmitTable.capacity()


        RetransmitTable table=new RetransmitTable(3, 10, 0);
        for(long i=0; i < 50; i++)
            addAndGet(table, i, "hello-" + i);
        System.out.println("table = " + table);
        assert table.size() == 50;
        assertCapacity(table.capacity(), table.getLength(), 10);
        assert table.getHighestPurged() == 0;
        assert table.getHighest() == 49;

        table.purge(43);
        addAndGet(table, 52, "hello-52");
View Full Code Here


            addAndGet(table, i, "hello-" + i);
        table.purge(49);
        assert table.isEmpty();
        addAndGet(table, 50, "50");
        assert table.size() == 1;
        assertCapacity(table.capacity(), table.getLength(), 10);
    }


    public static void testPurge() {
        RetransmitTable table=new RetransmitTable(5, 10, 0);
View Full Code Here

        assert table.size() == 80;
        table.purge(59);
        assert table.size() == 20;
        table.compact();
        assert table.size() == 20;
        assertCapacity(table.capacity(), table.getLength(), 10);
    }


    public void testCompactWithAutomaticPurging() {
        RetransmitTable table=new RetransmitTable(3, 10, 0);
View Full Code Here

            table.remove(i);

        assert table.size() == 20;
        table.compact();
        assert table.size() == 20;
        assertCapacity(table.capacity(), table.getLength(), 10);
    }

    public void testSizeOfAllMessages() {
        RetransmitTable table=new RetransmitTable(3, 10, 0);
        long size=table.sizeOfAllMessages(false);
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.