Examples of wasSuspected()


Examples of org.jgroups.util.Rsp.wasSuspected()

        rl.addRsp(tmp, new Integer(322649));
        Assert.assertEquals(6, rl.size());
        Rsp rsp=rl.get(tmp);
        assert rsp != null;
        assert rsp.wasReceived();
        assert !(rsp.wasSuspected());
        Assert.assertEquals(new Integer(322649), rsp.getValue());
    }


    public void testAddRsp2() {
View Full Code Here

Examples of org.jgroups.util.Rsp.wasSuspected()

        rl.addRsp(a1, new Integer(322649));
        Assert.assertEquals(5, rl.size());
        Rsp rsp=rl.get(a1);
        assert rsp != null;
        assert rsp.wasReceived();
        assert !(rsp.wasSuspected());
        Assert.assertEquals(new Integer(322649), rsp.getValue());
    }


    public void testNumSuspectedMembers() {
View Full Code Here

Examples of org.jgroups.util.Rsp.wasSuspected()

            rsp=(Rsp)it.next();
            if(rsp.wasReceived()) {
                num_received++;
            }
            else {
                if(rsp.wasSuspected()) {
                    num_suspected++;
                }
                else {
                    num_not_received++;
                }
View Full Code Here

Examples of org.jgroups.util.Rsp.wasSuspected()

        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());
        }

        rsps=disp.callRemoteMethods(null, "methodB", null, (Class[])null, GroupRequest.GET_ALL, 0);
        assertEquals(2, rsps.size());
        for(Iterator it=rsps.values().iterator(); it.hasNext();) {
View Full Code Here

Examples of org.jgroups.util.Rsp.wasSuspected()

        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());
        }


        rsps=disp.callRemoteMethods(null, "methodC", null, (Class[])null, GroupRequest.GET_ALL, 0);
        assertEquals(2, rsps.size());
View Full Code Here

Examples of org.jgroups.util.Rsp.wasSuspected()

        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());
        }

        disp.setRequestMarshaller(null);
        disp.setResponseMarshaller(null);
        disp2.setRequestMarshaller(null);
View Full Code Here

Examples of org.jgroups.util.Rsp.wasSuspected()

        if(rsp_list.size() > 1) {
            if(log.isWarnEnabled())
                log.warn("response list contains more that 1 response; returning first response !");
        }
        rsp=(Rsp)rsp_list.elementAt(0);
        if(rsp.wasSuspected()) {
            throw new SuspectedException(dest);
        }
        if(!rsp.wasReceived()) {
            throw new TimeoutException("timeout sending message to " + dest);
        }
View Full Code Here

Examples of org.jgroups.util.Rsp.wasSuspected()

           Rsp rsp = (Rsp)iter.next();
          
           if (!rsp.wasReceived())
           {
              // https://jira.jboss.org/jira/browse/JBMESSAGING-1657
                  if (!rsp.wasSuspected())
                  {
                     throw new IllegalStateException(this + " response not received from " + rsp.getSender() + " - there may be others");
                  }
           }
         }   
View Full Code Here

Examples of org.jgroups.util.Rsp.wasSuspected()

      }
      List<Object> retval = new ArrayList<Object>(rsps.size());
      for (Address dest : dests)
      {
         Rsp rsp = rsps.get(dest);
         if (rsp == null || (rsp.wasSuspected() && !rsp.wasReceived()))
         {
            // The corresponding member has left
            retval.add(new MemberHasLeftException("No response for the member " + dest
               + ", this member has probably left the cluster."));
         }
View Full Code Here

Examples of org.jgroups.util.Rsp.wasSuspected()

           Rsp rsp = (Rsp)iter.next();
          
           if (!rsp.wasReceived())
           {
              // https://jira.jboss.org/jira/browse/JBMESSAGING-1657
                  if (!rsp.wasSuspected())
                  {
                     throw new IllegalStateException(this + " response not received from " + rsp.getSender() + " - there may be others");
                  }
           }
         }   
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.