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");
      }

      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

      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

      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

      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

                              final String nodeId1,
                              final String nodeId2,
                              final TransportConfiguration cfg1,
                              final TransportConfiguration cfg2)
   {
      Topology topology = serverParameter.getClusterManager().getClusterConnection(clusterName).getTopology();

      TopologyMember member1 = topology.getMember(nodeId1);
      TopologyMember member2 = topology.getMember(nodeId2);
      Assert.assertEquals(member1.getA().toString(), cfg1.toString());
      Assert.assertEquals(member2.getA().toString(), cfg2.toString());
   }
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

   }

   private void waitForServerTopology(HornetQServer server, int nodes, int seconds)
         throws InterruptedException
   {
      Topology topology = server.getClusterManager().getTopology();
      long timeToWait = System.currentTimeMillis() + (seconds * 1000);
      while(topology.nodes()!= nodes)
      {
         Thread.sleep(100);
         if(System.currentTimeMillis() > timeToWait)
         {
            fail("timed out waiting for server topology");
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.