Package org.jboss.cache.buddyreplication

Examples of org.jboss.cache.buddyreplication.BuddyManager$AsyncViewChangeHandlerThread


         // Add this fqn to the set of those we are activating
         // so calls to _getState for the fqn can return quickly
         lock(fqn);

         BuddyManager buddyManager = cache.getBuddyManager();
         // Request partial state from the cluster and integrate it
         if (buddyManager == null)
         {
            // Get the state from any node that has it and put it
            // in the main cache
            if (subtreeRoot == null)
            {
               // We'll update this node with the state we receive
               // need to obtain all necessary locks.
               Node root = cache.getRoot();
               cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
               subtreeRoot = root.addChild(fqn);
               cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(false);
            }

            List<Address> members = cache.getMembers();

            // Don't bother trying to fetch state if we are in LOCAL mode
            if (members != null && !members.isEmpty())
            {
               rpcManager.fetchPartialState(members, subtreeRoot.getFqn());
            }
         }
         else if (!buddyFqnTransformer.isBackupFqn(fqn))
         {
            // Get the state from each DataOwner and integrate in their
            // respective buddy backup cache
            List<Address> buddies = buddyManager.getBackupDataOwners();
            for (Address buddy : buddies)
            {
               List<Address> sources = new ArrayList<Address>(1);
               if (!cache.getMembers().contains(buddy))
               {
View Full Code Here


         {
            deactivate(fqn);
         }

         // Create a list with the Fqn in the main cache and any buddy backup trees
         BuddyManager buddyManager = cache.getBuddyManager();
         ArrayList<Fqn> list = new ArrayList<Fqn>();
         list.add(fqn);

         if (buddyManager != null)
         {
View Full Code Here

         {
            deactivate(fqn);
         }

         // Create a list with the Fqn in the main cache and any buddy backup trees
         BuddyManager buddyManager = cache.getBuddyManager();
         ArrayList<Fqn> list = new ArrayList<Fqn>();
         list.add(fqn);

         if (buddyManager != null)
         {
View Full Code Here

         // Add this fqn to the set of those we are activating
         // so calls to _getState for the fqn can return quickly
         lock(fqn);

         BuddyManager buddyManager = cache.getBuddyManager();
         // Request partial state from the cluster and integrate it
         if (buddyManager == null)
         {
            // Get the state from any node that has it and put it
            // in the main cache
            if (subtreeRoot == null)
            {
               // We'll update this node with the state we receive
               // need to obtain all necessary locks.
               Node root = cache.getRoot();
               cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
               subtreeRoot = root.addChild(fqn);
               cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(false);
            }

            List<Address> members = cache.getMembers();

            // Don't bother trying to fetch state if we are in LOCAL mode
            if (members != null && !members.isEmpty())
               rpcManager.fetchPartialState(members, subtreeRoot.getFqn());
         }
         else if (!buddyFqnTransformer.isBackupFqn(fqn))
         {
            // Get the state from each DataOwner and integrate in their
            // respective buddy backup cache
            List<Address> buddies = buddyManager.getBackupDataOwners();
            for (Address buddy : buddies)
            {
               List<Address> sources = new ArrayList<Address>(1);
               if (!cache.getMembers().contains(buddy))
                  continue;
View Full Code Here

         {
            deactivate(fqn);
         }

         // Create a list with the Fqn in the main cache and any buddy backup trees
         BuddyManager buddyManager = cache.getBuddyManager();
         ArrayList<Fqn> list = new ArrayList<Fqn>();
         list.add(fqn);

         if (buddyManager != null)
         {
View Full Code Here

         // Add this fqn to the set of those we are activating
         // so calls to _getState for the fqn can return quickly
         lock(fqn);

         BuddyManager buddyManager = cache.getBuddyManager();
         // Request partial state from the cluster and integrate it
         if (buddyManager == null)
         {
            // Get the state from any node that has it and put it
            // in the main cache
            if (subtreeRoot == null)
            {
               // We'll update this node with the state we receive
               // need to obtain all necessary locks.
               Node root = cache.getRoot();
               cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
               subtreeRoot = root.addChild(fqn);
               cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(false);
            }

            List<Address> members = cache.getMembers();

            // Don't bother trying to fetch state if we are in LOCAL mode
            if (members != null && !members.isEmpty())
            {
               rpcManager.fetchPartialState(members, subtreeRoot.getFqn());
            }
         }
         else if (!buddyFqnTransformer.isBackupFqn(fqn))
         {
            // Get the state from each DataOwner and integrate in their
            // respective buddy backup cache
            List<Address> buddies = buddyManager.getBackupDataOwners();
            for (Address buddy : buddies)
            {
               List<Address> sources = new ArrayList<Address>(1);
               if (!cache.getMembers().contains(buddy))
               {
View Full Code Here

         {
            deactivate(fqn);
         }

         // Create a list with the Fqn in the main cache and any buddy backup trees
         BuddyManager buddyManager = cache.getBuddyManager();
         ArrayList<Fqn> list = new ArrayList<Fqn>();
         list.add(fqn);

         if (buddyManager != null)
         {
View Full Code Here

         // Add this fqn to the set of those we are activating
         // so calls to _getState for the fqn can return quickly
         activationChangeNodes.add(fqn);

         BuddyManager buddyManager = cache.getBuddyManager();
         // Request partial state from the cluster and integrate it
         if (buddyManager == null)
         {
            // Get the state from any node that has it and put it
            // in the main cache
            if (subtreeRoot == null)
            {
               // We'll update this node with the state we receive
               // need to obtain all necessary locks.
               cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
               subtreeRoot = cache.getRoot().addChild(fqn);
               cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(false);
            }

            List<Address> members = cache.getMembers();

            // Don't bother trying to fetch state if we are in LOCAL mode
            if (members != null && !members.isEmpty())
               rpcManager.fetchPartialState(members, subtreeRoot.getFqn());
         }
         else if (!buddyFqnTransformer.isBackupFqn(fqn))
         {
            // Get the state from each DataOwner and integrate in their
            // respective buddy backup cache
            List<Address> buddies = buddyManager.getBackupDataOwners();
            for (Address buddy : buddies)
            {
               List<Address> sources = new ArrayList<Address>(1);
               if (!cache.getMembers().contains(buddy))
                  continue;
View Full Code Here

         {
            deactivate(fqn);
         }

         // Create a list with the Fqn in the main cache and any buddy backup trees
         BuddyManager buddyManager = cache.getBuddyManager();
         ArrayList<Fqn> list = new ArrayList<Fqn>();
         list.add(fqn);

         if (buddyManager != null)
         {
View Full Code Here

   public void setBuddyReplicationConfig(Element config)
   {
      if (config != null)
      {
         buddyReplicationConfig = config;
         buddyManager = new BuddyManager(config);
         if (!buddyManager.isEnabled())
            buddyManager = null;
         else
            internalFqns.add(BuddyManager.BUDDY_BACKUP_SUBTREE_FQN);
      }
View Full Code Here

TOP

Related Classes of org.jboss.cache.buddyreplication.BuddyManager$AsyncViewChangeHandlerThread

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.