Package org.hornetq.core.client.impl

Examples of org.hornetq.core.client.impl.Topology


      if (ccs.size() != 1)
      {
         throw new IllegalStateException("You need a single cluster connection on this version of waitForTopology on ServiceTestBase, it had " + ccs.size());
      }

      Topology topology = ccs.iterator().next().getTopology();

      do
      {
         if (nodes == topology.getMembers().size())
         {
            return;
         }

         Thread.sleep(10);
      }
      while (System.currentTimeMillis() - start < timeout);

      String msg = "Timed out waiting for cluster topology of " + nodes +
                   " (received " +
                   topology.getMembers().size() +
                   ") topology = " +
                   topology +
                   ")";

      log.error(msg);
View Full Code Here


      long start = System.currentTimeMillis();

      ClusterConnection clusterConnection = server.getClusterManager().getClusterConnection(clusterConnectionName);


      Topology topology = clusterConnection.getTopology();

      do
      {
         if (nodes == topology.getMembers().size())
         {
            return;
         }

         Thread.sleep(10);
      }
      while (System.currentTimeMillis() - start < timeout);

      String msg = "Timed out waiting for cluster topology of " + nodes +
                   " (received " +
                   topology.getMembers().size() +
                   ") topology = " +
                   topology +
                   ")";

      log.error(msg);
View Full Code Here

            {
               return false;
            }
            Thread.sleep(5000); // wait a little for the topology updates
            // if the nodeID is null, then a node with that nodeID MUST be found:
            Topology topology = locator.getTopology();
            if (topology.isEmpty())
               // no servers found: trigger normal start.
               return false;
            if (nodeId0 != null)
            {
               TopologyMember node = topology.getMember(nodeId0.toString());
               if (node != null)
                  // if nodeId found within running servers, try fail-back
                  return true;
               // Error! NodeId not found but fail-back servers running: cancel start-up.
               stopTheServer();
               throw new HornetQException("Fail-back servers found but node is different ('local nodeId'=" + nodeId0 +
                        ")");
            }
            return !topology.isEmpty();
         }
         finally
         {
            if (factory != null)
               factory.close();
View Full Code Here

         locator = (ServerLocatorInternal)createNonHALocator(isNetty);

         ClientSessionFactory factory = locator.createSessionFactory();

         Topology topology = locator.getTopology();

         assertEquals(1, topology.getMembers().size());

         factory.close();

         TopologyMember member = topology.getMembers().iterator().next();
         if (isNetty)
         {
            assertEquals(NettyConnectorFactory.class.getName(), member.getA().getFactoryClassName());
         }
         else
View Full Code Here

      servers.get(4).start();
      servers.get(5).start();

      ServerLocatorImpl locator = (ServerLocatorImpl)getServerLocator(0);

      Topology topology = locator.getTopology();

      // for logging and debugging
      topology.setOwner("testMultipleFailovers");

      locator.setBlockOnNonDurableSend(true);
      locator.setBlockOnDurableSend(true);
      locator.setBlockOnAcknowledge(true);
      locator.setReconnectAttempts(-1);
View Full Code Here

      if (ccs.size() != 1)
      {
         throw new IllegalStateException("You need a single cluster connection on this version of waitForTopology on ServiceTestBase");
      }

      Topology topology = ccs.iterator().next().getTopology();

      do
      {
         if (nodes == topology.getMembers().size())
         {
            return;
         }

         Thread.sleep(10);
      }
      while (System.currentTimeMillis() - start < timeout);

      String msg = "Timed out waiting for cluster topology of " + nodes +
                   " (received " +
                   topology.getMembers().size() +
                   ") topology = " +
                   topology +
                   ")";

      log.error(msg);
View Full Code Here

      long start = System.currentTimeMillis();

      ClusterConnection clusterConnection = server.getClusterManager().getClusterConnection(clusterConnectionName);


      Topology topology = clusterConnection.getTopology();

      do
      {
         if (nodes == topology.getMembers().size())
         {
            return;
         }

         Thread.sleep(10);
      }
      while (System.currentTimeMillis() - start < timeout);

      String msg = "Timed out waiting for cluster topology of " + nodes +
                   " (received " +
                   topology.getMembers().size() +
                   ") topology = " +
                   topology +
                   ")";

      log.error(msg);
View Full Code Here

TOP

Related Classes of org.hornetq.core.client.impl.Topology

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.