Examples of PagedReference


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

      LinkedListIterator<PagedReference> iterator = cursor.iterator();
     
      for (int i = 0 ; i < TOTAL_MSG; i++ )
      {
         assertEquals(0, exceptions.get());
         PagedReference ref = null;
         for (int repeat = 0 ; repeat < 5; repeat++)
         {
            ref = iterator.next();
            if (ref == null)
            {
               Thread.sleep(1000);
            }
            else
            {
               break;
            }
         }
         assertNotNull(ref);
        
         ref.acknowledge();
         assertNotNull(ref);
        
         System.out.println("Consuming " + ref.getMessage().getIntProperty("key"));
         //assertEquals(i, ref.getMessage().getIntProperty("key").intValue());
      }

      assertEquals(0, exceptions.get());
   }
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.