Package org.jgroups.util

Examples of org.jgroups.util.AckCollector.ack()


    public void testOneList() throws TimeoutException, UnknownHostException {
        List tmp=new ArrayList();
        Address addr=new IpAddress("127.0.0.1", 5555);
        tmp.add(addr);
        AckCollector coll=new AckCollector(null, tmp);
        coll.ack(addr);
        coll.waitForAllAcks(1000);
    }


    public static void main(String[] args) {
View Full Code Here


    public void testOneList() throws TimeoutException, UnknownHostException {
        List tmp=new ArrayList();
        Address addr=new IpAddress("127.0.0.1", 5555);
        tmp.add(addr);
        AckCollector coll=new AckCollector(tmp);
        coll.ack(addr);
        coll.waitForAllAcks(1000);
    }


    public static void main(String[] args) {
View Full Code Here

        final AckCollector ac=new AckCollector(list);
        new Thread() {
            public void run() {
                for(Address member: list) {
                    Util.sleep(100);
                    ac.ack(member);
                    System.out.println("AckCollector: " + ac);
                }
            }
        }.start();
        ac.waitForAllAcks();
View Full Code Here

        final AckCollector ac=new AckCollector(list);
        new Thread() {
            public void run() {
                for(Address member: list) {
                    Util.sleep(100);
                    ac.ack(member);
                    System.out.println("AckCollector: " + ac);
                }
            }
        }.start();
        try {
View Full Code Here

        final AckCollector ac=new AckCollector(list);
        new Thread() {
            public void run() {
                for(Address member: list) {
                    Util.sleep(100);
                    ac.ack(member);
                    System.out.println("AckCollector: " + ac);
                }
            }
        }.start();
        ac.waitForAllAcks(10);
View Full Code Here

                Util.sleep(500);
                System.out.println("resetting AckCollector");
                ac.reset(new_list);
                System.out.println("reset AckCollector: " + ac);
                Util.sleep(100);
                ac.ack(six);
                System.out.println("AckCollector: " + ac);
                Util.sleep(100);
                ac.ack(seven);
                System.out.println("AckCollector: " + ac);
                Util.sleep(100);
View Full Code Here

                System.out.println("reset AckCollector: " + ac);
                Util.sleep(100);
                ac.ack(six);
                System.out.println("AckCollector: " + ac);
                Util.sleep(100);
                ac.ack(seven);
                System.out.println("AckCollector: " + ac);
                Util.sleep(100);
                ac.ack(eight);
                System.out.println("AckCollector: " + ac);
            }
View Full Code Here

                System.out.println("AckCollector: " + ac);
                Util.sleep(100);
                ac.ack(seven);
                System.out.println("AckCollector: " + ac);
                Util.sleep(100);
                ac.ack(eight);
                System.out.println("AckCollector: " + ac);
            }
        }.start();
        System.out.println("initial AckCollector: " + ac);
        ac.waitForAllAcks(30000);
View Full Code Here

    }

    public static void testOneList() throws TimeoutException {
        Address addr=Util.createRandomAddress();
        AckCollector coll=new AckCollector(addr);
        coll.ack(addr);
        coll.waitForAllAcks(1000);
    }

    public void testSuspect() {
        final AckCollector ac=new AckCollector(list);
View Full Code Here

    }

    public void testSuspect() {
        final AckCollector ac=new AckCollector(list);
        for(Address member: Arrays.asList(one,four,five))
            ac.ack(member);
        System.out.println("ac = " + ac);
        for(Address suspected: Arrays.asList(two,three))
            ac.suspect(suspected);
        System.out.println("ac = " + ac);
        assert ac.size() == 0;
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.