Package org.jgroups.util

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


        for(long i=0; i < 80; i++)
            addAndGet(table, i, "hello-" + i);
        assert table.size() == 80;
        table.purge(59);
        assert table.size() == 20;
        table.compact();
        assert table.size() == 20;
        assert table.capacity() == 40;
    }

View Full Code Here


        assert table.size() == 80;
        for(long i=0; i <= 59; i++)
            table.remove(i);

        assert table.size() == 20;
        table.compact();
        assert table.size() == 20;
        assert table.capacity() == 40;
    }

View Full Code Here

    public static void testAdditionWithOffset2() {
        RetransmitTable table=new RetransmitTable(3, 10, 2);
        addAndGet(table, 1000, "1000");
        addAndGet(table, 1001, "1001");
        table.compact();
        addAndGet(table, 1005, "1005");
        addAndGet(table, 1009, "1009");
        addAndGet(table, 1010, "1010");
        addAndGet(table, 1011, "1011");
        addAndGet(table, 1019, "1019");
View Full Code Here

        for(long i=0; i < 80; i++)
            addAndGet(table, i, "hello-" + i);
        assert table.size() == 80;
        table.purge(59);
        assert table.size() == 20;
        table.compact();
        assert table.size() == 20;
        assertCapacity(table.capacity(), table.getLength(), 10);
    }

View Full Code Here

        assert table.size() == 80;
        for(long i=0; i <= 59; i++)
            table.remove(i);

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

    public void testSizeOfAllMessages() {
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.