Package org.jboss.ha.framework.interfaces

Examples of org.jboss.ha.framework.interfaces.DistributedReplicantManager


      if (hasAdds)
      {
         statusCheckRequired = true;
      }
     
      DistributedReplicantManager drm  = partition.getDistributedReplicantManager();
      this.coordinator = drm.isMasterReplica(getServiceHAName());
     
      if (wasCoordinator && !coordinator)
      {
         // There's been a merge and we are no longer coordinator. Asynchronously
         // tell the rest of the cluster about our knowledge of timestamps
View Full Code Here


     
      this.lockSupport.start();
     
      this.partition.registerRPCHandler(getServiceHAName(), rpcTarget);
     
      DistributedReplicantManager drm = this.partition.getDistributedReplicantManager();
      drm.add(getServiceHAName(), this.partition.getClusterNode());
      this.serviceView = drm.lookupReplicantsNodes(getServiceHAName());
      drm.registerListener(getServiceHAName(), drmListener);
     
      this.initialized = true;
   }
View Full Code Here

      this.initialized = true;
   }
  
   public void shutdown() throws Exception
   {
      DistributedReplicantManager drm = this.partition.getDistributedReplicantManager();
      drm.unregisterListener(getServiceHAName(), drmListener);
      drm.remove(getServiceHAName());
      this.partition.unregisterRPCHandler(getServiceHAName(), rpcTarget);
      this.lockSupport.stop();
     
      this.contentManager = null;
     
View Full Code Here

    * DistributedState to see if we can remove/narrow the synchronization.
    */
   public synchronized void replicantsChanged(String key, java.util.List newReplicants, int newReplicantsViewId,
         boolean merge)
   {
      DistributedReplicantManager drm = this.partition.getDistributedReplicantManager();
     
      if (key.equals(this.RPC_HANDLER_NAME) && drm.isMasterReplica(this.RPC_HANDLER_NAME))
      {
         this.log.debug("The list of replicants for the JG bridge has changed, computing and updating local info...");

         DistributedState ds = this.partition.getDistributedStateService();
        
         // we remove any entry from the DS whose node is dead
         //
         java.util.Collection coll = ds.getAllKeys(this.RPC_HANDLER_NAME);
         if (coll == null)
         {
            this.log.debug("... No bridge info was associated with this node");
            return;
         }

         // to avoid ConcurrentModificationException, we copy the list of keys in a new structure
         //
         ArrayList collCopy = new java.util.ArrayList(coll);
         java.util.List newReplicantsNodeNames = drm.lookupReplicantsNodeNames(this.RPC_HANDLER_NAME);

         for (int i = 0; i < collCopy.size(); i++)
         {
            String nodeEntry = (String) collCopy.get(i);
            if (!newReplicantsNodeNames.contains(nodeEntry))
View Full Code Here

      if (this.partition == null)
         throw new IllegalStateException("HAPartition property must be set before starting InvalidationBridge service");

      this.RPC_HANDLER_NAME = "DCacheBridge-" + this.bridgeName;

      DistributedReplicantManager drm = this.partition.getDistributedReplicantManager();
      DistributedState ds = this.partition.getDistributedStateService();
     
      drm.add(this.RPC_HANDLER_NAME, "");
      drm.registerListener(this.RPC_HANDLER_NAME, this);
      ds.registerDSListenerEx(this.RPC_HANDLER_NAME, this);
      this.partition.registerRPCHandler(this.RPC_HANDLER_NAME, this);

      // we now publish the list of caches we have access to
      if (this.invalMgr == null)
View Full Code Here

   }

   @Override
   public void stopService()
   {
      DistributedReplicantManager drm = this.partition.getDistributedReplicantManager();
      DistributedState ds = this.partition.getDistributedStateService();
     
      try
      {
         this.partition.unregisterRPCHandler(this.RPC_HANDLER_NAME, this);
         ds.unregisterDSListenerEx(this.RPC_HANDLER_NAME, this);
         drm.unregisterListener(this.RPC_HANDLER_NAME, this);
         drm.remove(this.RPC_HANDLER_NAME);

         this.invalidationSubscription.unregister();

         ds.remove(this.RPC_HANDLER_NAME, this.partition.getNodeName(), true);
View Full Code Here

TOP

Related Classes of org.jboss.ha.framework.interfaces.DistributedReplicantManager

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.