Package org.jgroups.util

Examples of org.jgroups.util.Responses


        assert done;
        assert rsps.size() == 3;
    }

    public void testWaitForOnDone() {
        final Responses rsps=new Responses(5, true).done();
        boolean done=rsps.waitFor(500);
        assert done;
    }
View Full Code Here


        boolean done=rsps.waitFor(500);
        assert done;
    }

    public void testIterator() throws Exception {
        Responses rsps=new Responses(10, true);
        for(int i=0; i < 5; i++)
            rsps.addResponse(new PingData(addrs[i],true,names[i],phys_addrs[i]), false);
        int count=0;
        for(PingData data: rsps) {
            if(data != null)
                count++;
            if(count == 2)
                rsps.addResponse(new PingData(addrs[5],true,names[5],phys_addrs[5]), false);
        }
        assert count == 5;
    }
View Full Code Here

        }
        assert count == 5;
    }

    public void testIterator2() {
        Responses rsps=new Responses(10, true);
        int cnt=0;
        for(PingData data: rsps)
            if(data != null)
                cnt++;
        assert cnt == 0;
View Full Code Here

            return;
        }

        RouterStub stub=new RouterStub(host, port, null,null);
        stub.doConnect();
        Responses rsps=new Responses(false);
        stub.getMembers(cluster_name, rsps);
        for(PingData data: rsps)
            System.out.println(data);
        stub.destroy();
    }
View Full Code Here

TOP

Related Classes of org.jgroups.util.Responses

Copyright © 2018 www.massapicom. 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.