Package org.jgroups

Examples of org.jgroups.MergeView


   }

   private boolean needsToRejoin(View v) {
      if (v instanceof MergeView) {
         MergeView mv = (MergeView) v;
         org.jgroups.Address coord = v.getMembers().get(0);
         View winningPartition = null;
         for (View p : mv.getSubgroups()) {
            if (p.getMembers().get(0).equals(coord)) {
               winningPartition = p;
               break;
            }
         }
View Full Code Here


   private class NotifyMerge implements Notify {

      @Override
      public void emitNotification(List<Address> oldMembers, View newView) {
         MergeView mv = (MergeView) newView;

         final Address address = getAddress();
         final int viewId = (int) newView.getVid().getId();
         final boolean needsRejoin = needsToRejoin(newView);
        
         notifier.notifyMerge(members, oldMembers, address, viewId, needsRejoin, getSubgroups(mv.getSubgroups()));
         notifier.notifyViewChange(members, oldMembers, address, viewId, needsRejoin);
      }
View Full Code Here

   private class NotifyMerge implements Notify {

      @Override
      public void emitNotification(List<Address> oldMembers, View newView) {
         MergeView mv = (MergeView) newView;

         final Address address = getAddress();
         final int viewId = (int) newView.getVid().getId();
         notifier.notifyMerge(members, oldMembers, address, viewId, getSubgroups(mv.getSubgroups()));
      }
View Full Code Here

            synchronized(this) {
                Integer key=new Integer(getMod());
                mods.put(key, new_view.getVid());

                if(new_view instanceof MergeView) {
                    MergeView mv=(MergeView)new_view;
                    Vector<View> subgroups=mv.getSubgroups();
                    boolean amISubgroupLeader=false;
                    for(View view:subgroups) {
                        Address subCoord=view.getMembers().firstElement();
                        amISubgroupLeader=getLocalAddress().equals(subCoord);
                        if(amISubgroupLeader) {
View Full Code Here

   private class NotifyMerge implements Notify {

      @Override
      public void emitNotification(List<Address> oldMembers, View newView) {
         MergeView mv = (MergeView) newView;

         final Address address = getAddress();
         final int viewId = (int) newView.getVid().getId();
         final boolean needsRejoin = needsToRejoin(newView);
        
         notifier.notifyMerge(members, oldMembers, address, viewId, needsRejoin, getSubgroups(mv.getSubgroups()));
         notifier.notifyViewChange(members, oldMembers, address, viewId, needsRejoin);
      }
View Full Code Here

   }

   private boolean needsToRejoin(View v) {
      if (v instanceof MergeView) {
         MergeView mv = (MergeView) v;
         org.jgroups.Address coord = v.getMembers().get(0);
         View winningPartition = null;
         for (View p : mv.getSubgroups()) {
            if (p.getMembers().get(0).equals(coord)) {
               winningPartition = p;
               break;
            }
         }
View Full Code Here

   }

   private boolean needsToRejoin(View v) {
      if (v instanceof MergeView) {
         MergeView mv = (MergeView) v;
         org.jgroups.Address coord = v.getMembers().get(0);
         View winningPartition = null;
         for (View p : mv.getSubgroups()) {
            if (p.getMembers().get(0).equals(coord)) {
               winningPartition = p;
               break;
            }
         }
View Full Code Here

   private class NotifyMerge implements Notify {

      @Override
      public void emitNotification(List<Address> oldMembers, View newView) {
         MergeView mv = (MergeView) newView;
         notifier.notifyMerge(members, oldMembers, getAddress(), (int) newView.getVid().getId(), needsToRejoin(newView), getSubgroups(mv.getSubgroups()));
      }
View Full Code Here

   private class NotifyMerge implements Notify {

      @Override
      public void emitNotification(List<Address> oldMembers, View newView) {
         MergeView mv = (MergeView) newView;

         final Address address = getAddress();
         final int viewId = (int) newView.getVid().getId();
         notifier.notifyMerge(members, oldMembers, address, viewId, getSubgroups(mv.getSubgroups()));
      }
View Full Code Here

      }
   }

   private boolean needsToRejoin(View v) {
      if (v instanceof MergeView) {
         MergeView mv = (MergeView) v;
         org.jgroups.Address coord = v.getMembers().get(0);
         View winningPartition = null;
         for (View p : mv.getSubgroups()) {
            if (p.getMembers().get(0).equals(coord)) {
               winningPartition = p;
               break;
            }
         }
View Full Code Here

TOP

Related Classes of org.jgroups.MergeView

Copyright © 2018 www.massapicom. 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.