Examples of numReceived()


Examples of org.jgroups.util.RspList.numReceived()

        System.out.println("group request is " + req);
        assert rc;
        assert req.isDone();
        RspList results=req.getResults();
        Assert.assertEquals(3, results.size());
        Assert.assertEquals(1, results.numReceived());
    }


    @Test(groups=Global.FUNCTIONAL)
    public void testGetAllWithResponseFilter() throws Exception {
View Full Code Here

Examples of org.jgroups.util.RspList.numReceived()

        System.out.println("group request is " + req);
        assert rc;
        assert req.isDone();
        RspList results=req.getResults();
        Assert.assertEquals(3, results.size());
        Assert.assertEquals(2, results.numReceived());
    }


    /**
   * test group timeout. demonstrates that the timeout mechanism times out too
View Full Code Here

Examples of org.jgroups.util.RspList.numReceived()

                                                     return num < 2;
                                                 }
                                             });
        System.out.println("responses are:\n" + rsps);
        assertEquals("there should be three response values", 3, rsps.size());
        assertEquals("number of responses received should be 2", 2, rsps.numReceived());
    }


    /**
     * Test the ability of RpcDispatcher to handle large argument and return values
View Full Code Here

Examples of org.jgroups.util.RspList.numReceived()

        assertTrue(rc);
        assertEquals(0, req.getSuspects().size());
        assertTrue(req.isDone());
        RspList results=req.getResults();
        assertEquals(3, results.size());
        assertEquals(1, results.numReceived());
    }


    public void testGetAllWithResponseFilter() throws Exception {
        Object[] responses=new Message[]{new Message(null, a1, new Long(1)),
View Full Code Here

Examples of org.jgroups.util.RspList.numReceived()

        assertTrue(rc);
        assertEquals(0, req.getSuspects().size());
        assertTrue(req.isDone());
        RspList results=req.getResults();
        assertEquals(3, results.size());
        assertEquals(2, results.numReceived());
    }


    /**
   * test group timeout. demonstrates that the timeout mechanism times out too
View Full Code Here

Examples of org.jgroups.util.RspList.numReceived()

                                                  });

        RspList rsps=disp1.callRemoteMethods(null, "foo", null, null, options);
        System.out.println("responses are:\n" + rsps);
        assert rsps.size() == 3 : "there should be three response values";
        assert rsps.numReceived() == 2 : "number of responses received should be 2";
    }

    /**
     * Tests an incorrect response filter which always returns false for isAcceptable() and true for needsMoreResponses().
     * The call should return anyway after having received all responses, even if none of them was accepted by the
View Full Code Here

Examples of org.jgroups.util.RspList.numReceived()

                                                  });

        RspList rsps=disp1.callRemoteMethods(null, "foo", null, null, options);
        System.out.println("responses are:\n" + rsps);
        Util.assertEquals("there should be three response values", 3, rsps.size());
        Util.assertEquals("number of responses received should be 3", 0, rsps.numReceived());
    }

    /**
     * Runs with response mode of GET_FIRST and the response filter accepts only the last response
     * @throws Exception
View Full Code Here

Examples of org.jgroups.util.RspList.numReceived()

                                                  });

        RspList rsps=disp1.callRemoteMethods(null, "foo", null, null, options);
        System.out.println("responses are:\n" + rsps);
        Util.assertEquals("there should be three response values", 3, rsps.size());
        Util.assertEquals("number of responses received should be 3", 1, rsps.numReceived());
    }


    public void testFuture() throws Exception {
        MethodCall sleep=new MethodCall("sleep", new Object[]{5000L}, new Class[]{long.class});
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.