Package org.jboss.messaging.core.plugin.postoffice.cluster

Examples of org.jboss.messaging.core.plugin.postoffice.cluster.DefaultMessagePullPolicy


      DefaultClusteredPostOffice office2 = null;

      try
      {
         office1 = (DefaultClusteredPostOffice)
            createClusteredPostOffice(1, "testgroup", 10000, 10000, new DefaultMessagePullPolicy(),
                                      sc, ms, pm, tr);

         office2 = (DefaultClusteredPostOffice)
            createClusteredPostOffice(2, "testgroup", 10000, 10000, new DefaultMessagePullPolicy(),
                                      sc, ms, pm, tr);

         LocalClusteredQueue queue1 =
            new LocalClusteredQueue(office1, 1, "queue1", channelIDManager.getID(), ms, pm,
                                    true, true, -1, null, tr);
View Full Code Here


      DefaultClusteredPostOffice office2 = null;

      try
      {
         office1 = (DefaultClusteredPostOffice)
            createClusteredPostOffice(1, "testgroup", 10000, 10000, new DefaultMessagePullPolicy(),
                                      sc, ms, pm, tr);

         office2 = (DefaultClusteredPostOffice)
            createClusteredPostOffice(2, "testgroup", 10000, 10000, new DefaultMessagePullPolicy(),
                                      sc, ms, pm, tr);

         LocalClusteredQueue queue1 =
            new LocalClusteredQueue(office1, 1, "queue1", channelIDManager.getID(), ms, pm,
                                    true, true, -1, null, tr);
View Full Code Here

      DefaultClusteredPostOffice office2 = null;

      try
      {
         office1 = (DefaultClusteredPostOffice)
            createClusteredPostOffice(1, "testgroup", 10000, 10000, new DefaultMessagePullPolicy(),
                                      sc, ms, pm, tr);

         office2 = (DefaultClusteredPostOffice)
            createClusteredPostOffice(2, "testgroup", 10000, 10000, new DefaultMessagePullPolicy(),
                                      sc, ms, pm, tr);

         LocalClusteredQueue queue1 =
            new LocalClusteredQueue(office1, 1, "queue1", channelIDManager.getID(), ms, pm,
                                    true, true, -1, null, tr);
View Full Code Here

      DefaultClusteredPostOffice office2 = null;

      try
      {
         office1 = (DefaultClusteredPostOffice)
            createClusteredPostOffice(1, "testgroup", 10000, 10000, new DefaultMessagePullPolicy(),
                                      sc, ms, pm, tr);

         office2 = (DefaultClusteredPostOffice)
            createClusteredPostOffice(2, "testgroup", 10000, 10000, new DefaultMessagePullPolicy(),
                                      sc, ms, pm, tr);

         LocalClusteredQueue queue1 =
            new LocalClusteredQueue(office1, 1, "queue1", channelIDManager.getID(), ms, pm,
                                    true, true, -1, null, tr);
View Full Code Here

      try
      {
         log.trace("Creating post offices");

         office1 = (DefaultClusteredPostOffice)
            createClusteredPostOffice(1, "testgroup", 10000, 10000, new DefaultMessagePullPolicy(),
                                      sc, ms, pm, tr);

         office2 = (DefaultClusteredPostOffice)
            createClusteredPostOffice(2, "testgroup", 10000, 10000, new DefaultMessagePullPolicy(),
                                      sc, ms, pm, tr);

         office3 = (DefaultClusteredPostOffice)
            createClusteredPostOffice(3, "testgroup", 10000, 10000, new DefaultMessagePullPolicy(),
                                      sc, ms, pm, tr);

         office4 = (DefaultClusteredPostOffice)
            createClusteredPostOffice(4, "testgroup", 10000, 10000, new DefaultMessagePullPolicy(),
                                      sc, ms, pm, tr);

         office5 = (DefaultClusteredPostOffice)
            createClusteredPostOffice(5, "testgroup", 10000, 10000, new DefaultMessagePullPolicy(),
                                      sc, ms, pm, tr);

         log.trace("Created postoffices");

         LocalClusteredQueue queue1 =
View Full Code Here

      boolean readOK;

      try
      {
         office1 = (DefaultClusteredPostOffice)
            createClusteredPostOffice(1, "testgroup", 10000, 10000, new DefaultMessagePullPolicy(),
                                      sc, ms, pm, tr);

         office2 = (DefaultClusteredPostOffice)
            createClusteredPostOffice(2, "testgroup", 10000, 10000, new DefaultMessagePullPolicy(),
                                      sc, ms, pm, tr);

         office3 = (DefaultClusteredPostOffice)
            createClusteredPostOffice(3, "testgroup", 10000, 10000, new DefaultMessagePullPolicy(),
                                      sc, ms, pm, tr);

         office4 = (DefaultClusteredPostOffice)
            createClusteredPostOffice(4, "testgroup", 10000, 10000, new DefaultMessagePullPolicy(),
                                      sc, ms, pm, tr);

         office5 = (DefaultClusteredPostOffice)
            createClusteredPostOffice(5, "testgroup", 10000, 10000, new DefaultMessagePullPolicy(),
                                      sc, ms, pm, tr);

         LocalClusteredQueue queue1 =
            new LocalClusteredQueue(office1, 1, "queue1", channelIDManager.getID(), ms, pm,
                                    true, recoverable, -1, null, tr);
View Full Code Here

      super.tearDown();
   }
  
   public void test1() throws Exception
   {
      MessagePullPolicy policy = new DefaultMessagePullPolicy();
     
      List queues = new ArrayList();
     
      ClusteredQueue queue1 = new DummyClusteredQueue(true, "queue1", 1000);
     
      queues.add(queue1);
     
      ClusteredQueue queue2 = new DummyClusteredQueue(false, "queue2", 435);
     
      queues.add(queue2);
     
      ClusteredQueue queue3 = new DummyClusteredQueue(false, "queue3", 12);
     
      queues.add(queue3);
     
      ClusteredQueue queue4 = new DummyClusteredQueue(false, "queue4", 900);
     
      queues.add(queue4);
     
      ClusteredQueue queue5 = new DummyClusteredQueue(false, "queue5", 0);
     
      queues.add(queue5);
     
      ClusteredQueue chosen = policy.chooseQueue(queues);
     
      assertTrue(chosen == queue4);
   }
View Full Code Here

      assertTrue(chosen == queue4);
   }
  
   public void test2() throws Exception
   {
      MessagePullPolicy policy = new DefaultMessagePullPolicy();
     
      List queues = new ArrayList();
     
      ClusteredQueue queue1 = new DummyClusteredQueue(true, "queue1", 0);
     
      queues.add(queue1);
     
      ClusteredQueue queue2 = new DummyClusteredQueue(false, "queue2", 0);
     
      queues.add(queue2);
     
      ClusteredQueue queue3 = new DummyClusteredQueue(false, "queue3", 0);
     
      queues.add(queue3);
     
      ClusteredQueue queue4 = new DummyClusteredQueue(false, "queue4", 0);
     
      queues.add(queue4);
     
      ClusteredQueue queue5 = new DummyClusteredQueue(false, "queue5", 0);
     
      queues.add(queue5);
     
      ClusteredQueue chosen = policy.chooseQueue(queues);
     
      assertNull(chosen);
   }
View Full Code Here

      assertNull(chosen);
   }
  
   public void test3() throws Exception
   {
      MessagePullPolicy policy = new DefaultMessagePullPolicy();
     
      List queues = new ArrayList();
     
      ClusteredQueue queue1 = new DummyClusteredQueue(true, "queue1", 0);
     
      queues.add(queue1);          
     
      ClusteredQueue chosen = policy.chooseQueue(queues);
     
      assertNull(chosen);
   }
View Full Code Here

      assertNull(chosen);
   }
  
   public void test4() throws Exception
   {
      MessagePullPolicy policy = new DefaultMessagePullPolicy();
     
      List queues = new ArrayList();              
     
      ClusteredQueue chosen = policy.chooseQueue(queues);
     
      assertNull(chosen);
   }
View Full Code Here

TOP

Related Classes of org.jboss.messaging.core.plugin.postoffice.cluster.DefaultMessagePullPolicy

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.