Package org.hornetq.core.paging.impl

Examples of org.hornetq.core.paging.impl.PagingStoreImpl.page()


         // to be used on tests that are validating filters
         msg.putBooleanProperty("even", i % 2 == 0);

         msg.getBodyBuffer().writeBytes(buffer, 0, buffer.writerIndex());

         Assert.assertTrue(pageStore.page(msg, ctx, ctx.getContextListing(ADDRESS)));
      }

      return pageStore.getNumberOfPages();
   }
View Full Code Here


      ServerMessage msg = createMessage(1, storeImpl, destination, buffer);

      Assert.assertTrue(storeImpl.isPaging());

      Assert.assertTrue(storeImpl.page(msg));

      Assert.assertEquals(1, storeImpl.getNumberOfPages());

      storeImpl.sync();
View Full Code Here

         buffers.add(buffer);

         ServerMessage msg = createMessage(i, storeImpl, destination, buffer);

         Assert.assertTrue(storeImpl.page(msg));
      }

      Assert.assertEquals(1, storeImpl.getNumberOfPages());

      storeImpl.sync();
View Full Code Here

            storeImpl.forceAnotherPage();
         }

         ServerMessage msg = createMessage(i, storeImpl, destination, buffer);

         Assert.assertTrue(storeImpl.page(msg));
      }

      Assert.assertEquals(2, storeImpl.getNumberOfPages());

      storeImpl.sync();
View Full Code Here

      Assert.assertTrue(storeImpl.isPaging());

      ServerMessage msg = createMessage(1, storeImpl, destination, buffers.get(0));

      Assert.assertTrue(storeImpl.page(msg));

      Page newPage = storeImpl.depage();

      newPage.open();
View Full Code Here

      Assert.assertNull(storeImpl.depage());

      Assert.assertFalse(storeImpl.isPaging());

      Assert.assertFalse(storeImpl.page(msg));

      storeImpl.startPaging();

      Assert.assertTrue(storeImpl.page(msg));
View Full Code Here

      Assert.assertFalse(storeImpl.page(msg));

      storeImpl.startPaging();

      Assert.assertTrue(storeImpl.page(msg));

      Page page = storeImpl.depage();

      page.open();
View Full Code Here

                  // Each thread will Keep paging until all the messages are depaged.
                  // This is possible because the depage thread is not actually reading the pages.
                  // Just using the internal API to remove it from the page file system
                  ServerMessage msg = createMessage(id, storeImpl, destination, createRandomBuffer(id, 5));
                  if (storeImpl.page(msg))
                  {
                     buffers.put(id, msg);
                  }
                  else
                  {
View Full Code Here

      Assert.assertEquals(numberOfPages, storeImpl2.getNumberOfPages());

      long lastMessageId = messageIdGenerator.incrementAndGet();
      ServerMessage lastMsg = createMessage(lastMessageId, storeImpl, destination, createRandomBuffer(lastMessageId, 5));

      storeImpl2.page(lastMsg);
      buffers2.put(lastMessageId, lastMsg);

      Page lastPage = null;
      while (true)
      {
View Full Code Here

         ServerMessage msg = new ServerMessageImpl(i, buffer.writerIndex());
         msg.putIntProperty("key", i);

         msg.getBodyBuffer().writeBytes(buffer, 0, buffer.writerIndex());

         Assert.assertTrue(pageStore.page(msg, ctx, ctx.getContextListing(ADDRESS)));

         PagedReference readMessage = iterator.next();

         assertNotNull(readMessage);
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.