Package org.hornetq.core.server.impl

Examples of org.hornetq.core.server.impl.QueueImpl.deliverNow()


         refs.add(ref);

         queue.addLast(ref);
      }
     
      queue.deliverNow();

      Assert.assertEquals(numMessages * 2, queue.getMessageCount());
      Assert.assertEquals(0, queue.getScheduledCount());
      Assert.assertEquals(numMessages * 2, queue.getDeliveringCount());

View Full Code Here


         refs.add(ref);

         queue.addLast(ref);
      }
     
      queue.deliverNow();

      Assert.assertEquals(numMessages * 3, queue.getMessageCount());
      Assert.assertEquals(0, queue.getScheduledCount());
      Assert.assertEquals(numMessages * 3, queue.getDeliveringCount());

View Full Code Here

         refs.add(ref);

         queue.addLast(ref);
      }

      queue.deliverNow();
     
      Assert.assertEquals(numMessages * 2, queue.getMessageCount());
      Assert.assertEquals(0, queue.getScheduledCount());
      Assert.assertEquals(numMessages * 2, queue.getDeliveringCount());

View Full Code Here

         refs.add(ref);

         queue.addLast(ref);
      }
     
      queue.deliverNow();

      Assert.assertEquals(numMessages, queue.getMessageCount());
      Assert.assertEquals(0, queue.getScheduledCount());
      Assert.assertEquals(numMessages, queue.getDeliveringCount());
View Full Code Here

      queue.addConsumer(cons1);

      queue.addConsumer(cons2);

      queue.deliverNow();

      Assert.assertEquals(numMessages / 2, cons1.getReferences().size());

      Assert.assertEquals(numMessages / 2, cons2.getReferences().size());
View Full Code Here

      FakeConsumer consumer = new FakeConsumer();

      queue.addConsumer(consumer);
     
      queue.deliverNow();
     
      List<MessageReference> receivedRefs = consumer.getReferences();

      // Should be in reverse order
View Full Code Here

      queue.removeConsumer(consumer);

      queue.addConsumer(consumer);

      queue.deliverNow();

      refs.clear();

      consumer.clearReferences();
View Full Code Here

      Assert.assertEquals(10, queue.getMessageCount());
      Assert.assertEquals(0, queue.getScheduledCount());
      Assert.assertEquals(0, queue.getDeliveringCount());

      queue.deliverNow();

      consumer.setStatusImmediate(null);

      queue.deliverNow();
View Full Code Here

      queue.deliverNow();

      consumer.setStatusImmediate(null);

      queue.deliverNow();

      List<MessageReference> receeivedRefs = consumer.getReferences();
      int currId = 0;
      for (MessageReference receeivedRef : receeivedRefs)
      {
View Full Code Here

      Assert.assertEquals(10, queue.getMessageCount());
      Assert.assertEquals(0, queue.getScheduledCount());
      Assert.assertEquals(0, queue.getDeliveringCount());

      queue.deliverNow();

      Assert.assertEquals(10, queue.getMessageCount());
      Assert.assertEquals(0, queue.getScheduledCount());
      Assert.assertEquals(0, queue.getDeliveringCount());
      Assert.assertTrue(consumer.getReferences().isEmpty());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.