Package org.jgroups.util

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


         // 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


/*     */
/* 246 */       RspList rspList = this.dispatcher.castMessage(null, message, sync ? 2 : 6, this.castTimeout);
/*     */
/* 249 */       if (sync)
/*     */       {
/* 251 */         Iterator iter = rspList.values().iterator();
/*     */
/* 253 */         while (iter.hasNext())
/*     */         {
/* 255 */           Rsp rsp = (Rsp)iter.next();
/*     */
View Full Code Here

/*     */
/* 277 */       RspList rspList = this.dispatcher.castMessage(v, message, sync ? 2 : 6, this.castTimeout);
/*     */
/* 280 */       if (sync)
/*     */       {
/* 282 */         Iterator iter = rspList.values().iterator();
/*     */
/* 284 */         while (iter.hasNext())
/*     */         {
/* 286 */           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()) {
            if (rsp.wasSuspected() || !rsp.wasReceived()) {
               if (rsp.wasSuspected()) {
                  throw new SuspectException("Suspected member: " + rsp.getSender());
               } else {
                  // if we have a response filter then we may not have waited for some nodes!
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

         // short-circuit no-return-value calls.
         if (rsps == null) return Collections.emptyMap();
         Map<Address, Response> retval = new HashMap<Address, Response>(rsps.size());

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

         if (noValidResponses) throw new TimeoutException("Timed out waiting for valid responses!");
         return retval;
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()) {
            if (rsp.wasSuspected() || !rsp.wasReceived()) {
               if (rsp.wasSuspected()) {
                  throw new SuspectException("Suspected member: " + rsp.getSender());
               } else {
                  // if we have a response filter then we may not have waited for some nodes!
View Full Code Here

        try {
            RspList rsps=disp.callRemoteMethods(null,
                                                new MethodCall(GET, new Object[]{key}),
                                                GroupRequest.GET_ALL,
                                                call_timeout);
            for(Rsp rsp: rsps.values()) {
                Object obj=rsp.getValue();
                if(obj == null || obj instanceof Throwable)
                    continue;
                val=(Cache.Value<Value<V>>)rsp.getValue();
                if(val != 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},
                                    new RequestOptions(ResponseMode.GET_ALL, 0));
        assert rsps.size() == 2;
        for(Iterator<Rsp> it=rsps.values().iterator(); it.hasNext();) {
            Rsp rsp=it.next();
            assert rsp.getValue() == null;
            assertTrue(rsp.wasReceived());
            assertFalse(rsp.wasSuspected());
        }
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.