Package org.hornetq.core.server.cluster

Examples of org.hornetq.core.server.cluster.ClusterConnection


            ProtocolType protocol = ProtocolType.valueOf(protocolString.toUpperCase());

            ProtocolManager manager = protocolMap.get(protocol);
           
            ClusterConnection clusterConnection = lookupClusterConnection(info);
           
            Acceptor acceptor = factory.createAcceptor(clusterConnection,
                                                       info.getParams(),
                                                       new DelegatingBufferHandler(),
                                                       manager,
View Full Code Here


  
   private ClusterConnection lookupClusterConnection(TransportConfiguration config)
   {
      String clusterConnectionName = (String)config.getParams().get(org.hornetq.core.remoting.impl.netty.TransportConstants.CLUSTER_CONNECTION);
     
      ClusterConnection clusterConnection = null;
      if (clusterConnectionName != null)
      {
         clusterConnection = clusterManager.getClusterConnection(clusterConnectionName);
      }
     
View Full Code Here

   private synchronized void announceNode()
   {
      // TODO does this really work with more than one cluster connection? I think not

      // Just take the first one for now
      ClusterConnection cc = clusterConnections.values().iterator().next();

      String nodeID = server.getNodeID().toString();

      TopologyMember member = topology.getMember(nodeID);

      if (member == null)
      {
         if (backup)
         {
            member = new TopologyMember(new Pair<TransportConfiguration, TransportConfiguration>(null, cc.getConnector()));
         }
         else
         {
            member = new TopologyMember(new Pair<TransportConfiguration, TransportConfiguration>(cc.getConnector(), null));
         }

         topology.addMember(nodeID, member);
      }
      else
View Full Code Here

   private synchronized void announceNode()
   {
      // TODO does this really work with more than one cluster connection? I think not

      // Just take the first one for now
      ClusterConnection cc = clusterConnections.values().iterator().next();

      String nodeID = server.getNodeID().toString();

      TopologyMember member = topology.getMember(nodeID);

      if (member == null)
      {
         if (backup)
         {
            member = new TopologyMember(new Pair<TransportConfiguration, TransportConfiguration>(null, cc.getConnector()));
         }
         else
         {
            member = new TopologyMember(new Pair<TransportConfiguration, TransportConfiguration>(cc.getConnector(), null));
         }

         topology.addMember(nodeID, member);
      }
      else
View Full Code Here

   private synchronized void announceNode()
   {
      // TODO does this really work with more than one cluster connection? I think not

      // Just take the first one for now
      ClusterConnection cc = clusterConnections.values().iterator().next();

      String nodeID = server.getNodeID().toString();

      TopologyMember member = topology.getMember(nodeID);

      if (member == null)
      {
         if (backup)
         {
            member = new TopologyMember(new Pair<TransportConfiguration, TransportConfiguration>(null,
                                                                                                 cc.getConnector()));
         }
         else
         {
            member = new TopologyMember(new Pair<TransportConfiguration, TransportConfiguration>(cc.getConnector(),
                                                                                                 null));
         }

         topology.addMember(nodeID, member);
      }
View Full Code Here

                     }
                  }
               }
            }

            ClusterConnection clusterConnection = lookupClusterConnection(info);

            Acceptor acceptor = factory.createAcceptor(info.getName(),
                                                       clusterConnection,
                                                       info.getParams(),
                                                       new DelegatingBufferHandler(),
View Full Code Here

   private ClusterConnection lookupClusterConnection(TransportConfiguration acceptorConfig)
   {
      String clusterConnectionName = (String) acceptorConfig.getParams().get(org.hornetq.core.remoting.impl.netty.TransportConstants.CLUSTER_CONNECTION);

      ClusterConnection clusterConnection = null;
      if (clusterConnectionName != null)
      {
         clusterConnection = clusterManager.getClusterConnection(clusterConnectionName);
      }
View Full Code Here

               HornetQServerLogger.LOGGER.trace("Server " + server + " receiving nodeUp from NodeID=" + msg.getNodeID() + ", pair=" + pair);
            }

            if (acceptorUsed != null)
            {
               ClusterConnection clusterConn = acceptorUsed.getClusterConnection();
               if (clusterConn != null)
               {
                  clusterConn.nodeAnnounced(msg.getCurrentEventID(), msg.getNodeID(), msg.getNodeName(), pair, msg.isBackup());
               }
               else
               {
                  HornetQServerLogger.LOGGER.debug("Cluster connection is null on acceptor = " + acceptorUsed);
               }
            }
            else
            {
               HornetQServerLogger.LOGGER.debug("there is no acceptor used configured at the CoreProtocolManager " + this);
            }
         }
         else if (packet.getType() == PacketImpl.BACKUP_REGISTRATION)
         {
            BackupRegistrationMessage msg = (BackupRegistrationMessage)packet;
            ClusterConnection clusterConnection = acceptorUsed.getClusterConnection();

            if (!config.isSecurityEnabled() || clusterConnection.verify(msg.getClusterUser(), msg.getClusterPassword()))
            {
               try
               {
                  server.startReplication(rc, clusterConnection, getPair(msg.getConnector(), true),
                                          msg.isFailBackRequest());
View Full Code Here

            ProtocolType protocol = ProtocolType.valueOf(protocolString.toUpperCase());

            ProtocolManager manager = protocolMap.get(protocol);

            ClusterConnection clusterConnection = lookupClusterConnection(info);

            Acceptor acceptor = factory.createAcceptor(clusterConnection,
                                                       info.getParams(),
                                                       new DelegatingBufferHandler(),
                                                       manager,
View Full Code Here

   private ClusterConnection lookupClusterConnection(TransportConfiguration acceptorConfig)
   {
      String clusterConnectionName = (String)acceptorConfig.getParams().get(org.hornetq.core.remoting.impl.netty.TransportConstants.CLUSTER_CONNECTION);

      ClusterConnection clusterConnection = null;
      if (clusterConnectionName != null)
      {
         clusterConnection = clusterManager.getClusterConnection(clusterConnectionName);
      }
View Full Code Here

TOP

Related Classes of org.hornetq.core.server.cluster.ClusterConnection

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.