Examples of bookmark()


Examples of org.hornetq.core.paging.cursor.PageSubscription.bookmark()

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

      PageSubscription cursor = cursorProvider.getSubscription(queue.getID());
      PagePosition startingPos = new PagePositionImpl(5, cache.getNumberOfMessages() / 2);
      cursor.bookmark(startingPos);

      // We can't proceed until the operation has finished
      server.getStorageManager().waitOnOperations();
     
      PagedMessage msg = cache.getMessage(startingPos.getMessageNr() + 1);
View Full Code Here

Examples of org.hornetq.core.paging.cursor.PageSubscription.bookmark()

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

      PageSubscription cursor = cursorProvider.getSubscription(queue.getID());
      PagePosition startingPos = new PagePositionImpl(5, cache.getNumberOfMessages() / 2);
      cursor.bookmark(startingPos);

      // We can't proceed until the operation has finished
      server.getStorageManager().waitOnOperations();
     
      PagedMessage msg = cache.getMessage(startingPos.getMessageNr() + 1);
View Full Code Here

Examples of org.hornetq.core.paging.cursor.PageSubscription.bookmark()

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

      queue.getPageSubscription().close();

      PagePosition startingPos = new PagePositionImpl(5, cache.getNumberOfMessages() / 2);
      cursor.bookmark(startingPos);
      PagedMessage msg = cache.getMessage(startingPos.getMessageNr() + 1);
      msg.initMessage(server.getStorageManager());
      int key = msg.getMessage().getIntProperty("key").intValue();

      msg = null;
View Full Code Here

Examples of org.hornetq.core.paging.cursor.PageSubscription.bookmark()

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

      PageSubscription cursor = cursorProvider.getSubscription(queue.getID());
      PagePosition startingPos = new PagePositionImpl(5, cache.getNumberOfMessages() / 2);
      cursor.bookmark(startingPos);

      // We can't proceed until the operation has finished
      server.getStorageManager().waitOnOperations();
     
      PagedMessage msg = cache.getMessage(startingPos.getMessageNr() + 1);
View Full Code Here

Examples of org.hornetq.core.paging.cursor.impl.PageSubscriptionImpl.bookmark()

      PagedReference msg;
      LinkedListIterator<PagedReference> iterator = cursor.iterator();
      LinkedListIterator<PagedReference> iterator2 = cursor2.iterator();
     
      cursor2.bookmark(new PagePositionImpl(1, -1));

      int key = 0;
      while ((msg = iterator.next()) != null)
      {
         System.out.println("key = " + key);
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.