Package org.jgroups.util

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


        System.out.println("table (before remove):\n" + table.dump());
        for(long seqno=0; seqno <= 22; seqno++)
            table.remove(seqno);

        System.out.println("\ntable (after remove 22, before purge):\n" + table.dump());
        table.purge(22);
        System.out.println("\ntable: (after purge 22):\n" + table.dump());
        assert table.size() == 2 + seqnos.length;
    }

View Full Code Here


    public void testCompact() {
        RetransmitTable table=new RetransmitTable(3, 10, 0);
        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

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.