Examples of PageCursorProvider


Examples of org.hornetq.core.paging.cursor.PageCursorProvider

      int numberOfPages = addMessages(NUM_MESSAGES, 1024 * 1024);

      System.out.println("NumberOfPages = " + numberOfPages);

      PageCursorProvider cursorProvider = lookupCursorProvider();

      PageSubscription cursor = cursorProvider.getSubscription(queue.getID());

      LinkedListIterator<PagedReference> iter = cursor.iterator();
     
      LinkedListIterator<PagedReference> iter2 = cursor.iterator();
     
View Full Code Here

Examples of org.hornetq.core.paging.cursor.PageCursorProvider

      int numberOfPages = addMessages(NUM_MESSAGES, 1024);

      System.out.println("NumberOfPages = " + numberOfPages);

      PageCursorProvider cursorProvider = lookupCursorProvider();

      PageCache cache = cursorProvider.getPageCache(new PagePositionImpl(2, 0));

      assertNull(cache);
   }
View Full Code Here

Examples of org.hornetq.core.paging.cursor.PageCursorProvider

      int numberOfPages = addMessages(NUM_MESSAGES, 100 * 1024);

      System.out.println("Number of pages = " + numberOfPages);

      PageCursorProvider cursorProvider = lookupCursorProvider();

      PageSubscription cursor = this.server.getPagingManager()
                                           .getPageStore(ADDRESS)
                                           .getCursorProvier()
                                           .getSubscription(queue.getID());

      PageCache firstPage = cursorProvider.getPageCache(new PagePositionImpl(server.getPagingManager()
                                                                                   .getPageStore(ADDRESS)
                                                                                   .getFirstPage(), 0));

      int firstPageSize = firstPage.getNumberOfMessages();

      firstPage = null;

      System.out.println("Cursor: " + cursor);
      cursorProvider.printDebug();

      LinkedListIterator<PagedReference> iterator = cursor.iterator();

      for (int i = 0; i < 1000; i++)
      {
         System.out.println("Reading Msg : " + i);
         PagedReference msg = iterator.next();
         assertNotNull(msg);
         assertEquals(i, msg.getMessage().getIntProperty("key").intValue());

         if (i < firstPageSize)
         {
            cursor.ack(msg);
         }
      }
      cursorProvider.printDebug();

      server.getStorageManager().waitOnOperations();
      lookupPageStore(ADDRESS).flushExecutors();

      // needs to clear the context since we are using the same thread over two distinct servers
View Full Code Here

Examples of org.hornetq.core.paging.cursor.PageCursorProvider

      int numberOfPages = addMessages(NUM_MESSAGES, 10 * 1024);

      System.out.println("Number of pages = " + numberOfPages);

      PageCursorProvider cursorProvider = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvier();
      System.out.println("cursorProvider = " + cursorProvider);

      PageSubscription cursor = this.server.getPagingManager()
                                           .getPageStore(ADDRESS)
                                           .getCursorProvier()
View Full Code Here

Examples of org.hornetq.core.paging.cursor.PageCursorProvider

      int numberOfPages = addMessages(NUM_MESSAGES, 10 * 1024);

      System.out.println("Number of pages = " + numberOfPages);

      PageCursorProvider cursorProvider = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvier();
      System.out.println("cursorProvider = " + cursorProvider);

      PageSubscription cursor = this.server.getPagingManager()
                                           .getPageStore(ADDRESS)
                                           .getCursorProvier()
View Full Code Here

Examples of org.hornetq.core.paging.cursor.PageCursorProvider

      final int NUM_MESSAGES = 100;

      final int messageSize = 1024 * 1024;

      PageCursorProvider cursorProvider = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvier();
      System.out.println("cursorProvider = " + cursorProvider);

      PageSubscription cursor = this.server.getPagingManager()
                                           .getPageStore(ADDRESS)
                                           .getCursorProvier()
View Full Code Here

Examples of org.hornetq.core.paging.cursor.PageCursorProvider

     
      final int TOTAL_MSG = NUM_TX * MSGS_TX;

      final int messageSize = 1024;

      PageCursorProvider cursorProvider = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvier();
      System.out.println("cursorProvider = " + cursorProvider);

      PageSubscription cursor = this.server.getPagingManager()
                                           .getPageStore(ADDRESS)
                                           .getCursorProvier()
View Full Code Here

Examples of org.hornetq.core.paging.cursor.PageCursorProvider

      final int NUM_MESSAGES = 100;

      final int messageSize = 100 * 1024;

      PageCursorProvider cursorProvider = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvier();
      System.out.println("cursorProvider = " + cursorProvider);

      PageSubscription cursor = this.server.getPagingManager()
                                           .getPageStore(ADDRESS)
                                           .getCursorProvier()
View Full Code Here

Examples of org.hornetq.core.paging.cursor.PageCursorProvider

      final int NUM_MESSAGES = 100;

      final int messageSize = 100 * 1024;

      PageCursorProvider cursorProvider = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvier();
      System.out.println("cursorProvider = " + cursorProvider);

      PageSubscription cursor = this.server.getPagingManager()
                                           .getPageStore(ADDRESS)
                                           .getCursorProvier()
View Full Code Here

Examples of org.hornetq.core.paging.cursor.PageCursorProvider

   public void testCloseNonPersistentConsumer() throws Exception
   {

      final int NUM_MESSAGES = 100;

      PageCursorProvider cursorProvider = lookupCursorProvider();

      PageSubscription cursor = cursorProvider.createSubscription(11, null, false);
      PageSubscriptionImpl cursor2 = (PageSubscriptionImpl)cursorProvider.createSubscription(12, null, false);
     
      this.queueList.add(new FakeQueue(new SimpleString("a"), 11));
     
      this.queueList.add(new FakeQueue(new SimpleString("b"), 12));
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.