Package org.jgroups

Examples of org.jgroups.View.containsMember()


            channel.connect("testgroup1");
            channel.disconnect();
            channel.connect("testgroup2");
            View view=channel.getView();
            assertEquals(1, view.size());
            assertTrue(view.containsMember(channel.getLocalAddress()));
        }
        finally {
            Utilities.stopGossipRouter();
        }
     }
View Full Code Here


             Thread.sleep(1000);

             View view=channel.getView();
             assertEquals(2, view.size());
             assertTrue(view.containsMember(channel.getLocalAddress()));
             assertTrue(view.containsMember(coordinator.getLocalAddress()));

             coordinator.close();
         }
         finally {
View Full Code Here

             Thread.sleep(1000);

             View view=channel.getView();
             assertEquals(2, view.size());
             assertTrue(view.containsMember(channel.getLocalAddress()));
             assertTrue(view.containsMember(coordinator.getLocalAddress()));

             coordinator.close();
         }
         finally {
             Utilities.stopGossipRouter();
View Full Code Here

         case Event.VIEW_CHANGE :
            //if this is channel's first view and its the only member of the group then the
            //goal is to pass BLOCK,VIEW,UNBLOCK to application space on the same thread as VIEW.
            View newView = (View) evt.getArg();
            boolean firstView = onViewChange(newView);
            boolean singletonMember = newView.size()==1 && newView.containsMember(localAddress);
            if(firstView && singletonMember){
               passUp(evt);
               synchronized (blockMutex)
               {
                  isBlockingFlushDown = false;
View Full Code Here

   private List<Address> checkBuddyStatus(List<Address> members)
   {
      Channel ch = configuration.getRuntimeConfig().getChannel();
      View currentView = ch.getView();
      List<Address> deadBuddies = new LinkedList<Address>();
      for (Address a : members) if (!currentView.containsMember(a)) deadBuddies.add(a);
      return deadBuddies;
   }

   // -------------- methods to be called by the tree cache  --------------------
View Full Code Here

               winningPartition = p;
               break;
            }
         }

         if (!winningPartition.containsMember(channel.getAddress())) return true;
      }
      return false;
   }

   public void suspect(org.jgroups.Address suspected_mbr) {
View Full Code Here

   private List<Address> checkBuddyStatus(List<Address> members)
   {
      Channel ch = configuration.getRuntimeConfig().getChannel();
      View currentView = ch.getView();
      List<Address> deadBuddies = new LinkedList<Address>();
      for (Address a : members) if (!currentView.containsMember(a)) deadBuddies.add(a);
      return deadBuddies;
   }

   // -------------- methods to be called by the tree cache  --------------------
View Full Code Here

               winningPartition = p;
               break;
            }
         }

         if (!winningPartition.containsMember(channel.getAddress())) return true;
      }
      return false;
   }

   public void suspect(org.jgroups.Address suspected_mbr) {
View Full Code Here

               winningPartition = p;
               break;
            }
         }

         if (!winningPartition.containsMember(channel.getAddress())) return true;
      }
      return false;
   }

   public void suspect(org.jgroups.Address suspected_mbr) {
View Full Code Here

               winningPartition = p;
               break;
            }
         }

         return winningPartition == null || !winningPartition.containsMember(channel.getAddress());
      }
      return false;
   }

   public void suspect(org.jgroups.Address suspected_mbr) {
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.