Package org.jgroups.util

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


       RspList rspList =
         dispatcher.castMessage(null, message, sync ? GroupRequest.GET_ALL: GroupRequest.GET_NONE, castTimeout)
      
       if (sync)
       {          
         Iterator iter = rspList.values().iterator();
        
         while (iter.hasNext())
         {
           Rsp rsp = (Rsp)iter.next();
          
View Full Code Here


       RspList rspList =
         dispatcher.castMessage(v, message, sync ? GroupRequest.GET_ALL: GroupRequest.GET_NONE, castTimeout)
      
       if (sync)
       {          
         Iterator iter = rspList.values().iterator();
        
         while (iter.hasNext())
         {
           Rsp rsp = (Rsp)iter.next();
          
View Full Code Here

         // short-circuit no-return-value calls.
         if (rsps == null) return Collections.emptyList();
         List<Response> retval = new ArrayList<Response>(rsps.size());

         boolean noValidResponses = true;
         for (Rsp rsp : rsps.values()) {
            noValidResponses = parseResponseAndAddToResponseList(rsp.getValue(), retval, rsp.wasSuspected(), rsp.wasReceived(), new JGroupsAddress(rsp.getSender()), responseFilter != null) && noValidResponses;
         }

         if (noValidResponses) throw new TimeoutException("Timed out waiting for valid responses!");
         return retval;
View Full Code Here

            assert view.size() == 2;
            RspList rsps=d1.callRemoteMethods(null, "foo", null, (Class[])null, GroupRequest.GET_ALL, 5000);
            System.out.println("rsps:\n" + rsps);
            assert rsps.size() == 2;
            for(Rsp rsp: rsps.values()) {
                assert rsp.wasReceived();
                assert !rsp.wasSuspected();
                assert rsp.getValue() != null;
    }
View Full Code Here

            d2.setServerObject(server_object);

            rsps=d2.callRemoteMethods(null, "foobar", null, (Class[])null, GroupRequest.GET_ALL, 5000);
            System.out.println("rsps:\n" + rsps);
            assert rsps.size() == 2;
            for(Rsp rsp: rsps.values()) {
                assert rsp.wasReceived();
                assert !rsp.wasSuspected();
                assert rsp.getValue() != null;
            }
        }
View Full Code Here

        RspList rsps;
        rsps=disp.callRemoteMethods(null, "methodA", new Object[]{Boolean.TRUE, new Long(322649)},
                                    new Class[]{boolean.class, long.class},
                                    GroupRequest.GET_ALL, 0);
        assertEquals(2, rsps.size());
        for(Iterator it=rsps.values().iterator(); it.hasNext();) {
            Rsp rsp=(Rsp)it.next();
            assertNull(rsp.getValue());
            assertTrue(rsp.wasReceived());
            assertFalse(rsp.wasSuspected());
        }
View Full Code Here

            assertFalse(rsp.wasSuspected());
        }

        rsps=disp.callRemoteMethods(null, "methodB", null, (Class[])null, GroupRequest.GET_ALL, 0);
        assertEquals(2, rsps.size());
        for(Iterator it=rsps.values().iterator(); it.hasNext();) {
            Rsp rsp=(Rsp)it.next();
            assertNotNull(rsp.getValue());
            assertEquals(Boolean.TRUE, rsp.getValue());
            assertTrue(rsp.wasReceived());
            assertFalse(rsp.wasSuspected());
View Full Code Here

        }


        rsps=disp.callRemoteMethods(null, "methodC", null, (Class[])null, GroupRequest.GET_ALL, 0);
        assertEquals(2, rsps.size());
        for(Iterator it=rsps.values().iterator(); it.hasNext();) {
            Rsp rsp=(Rsp)it.next();
            assertNotNull(rsp.getValue());
            assertTrue(rsp.getValue() instanceof Throwable);
            assertTrue(rsp.wasReceived());
            assertFalse(rsp.wasSuspected());
View Full Code Here

       RspList rspList =
         dispatcher.castMessage(null, message, sync ? GroupRequest.GET_ALL: GroupRequest.GET_NONE, castTimeout)
      
       if (sync)
       {          
         Iterator iter = rspList.values().iterator();
        
         while (iter.hasNext())
         {
           Rsp rsp = (Rsp)iter.next();
          
View Full Code Here

       RspList rspList =
         dispatcher.castMessage(v, message, sync ? GroupRequest.GET_ALL: GroupRequest.GET_NONE, castTimeout)
      
       if (sync)
       {          
         Iterator iter = rspList.values().iterator();
        
         while (iter.hasNext())
         {
           Rsp rsp = (Rsp)iter.next();
          
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.