Examples of nextStreamOptions()


Examples of org.jclouds.openstack.marconi.v1.domain.MessageStream.nextStreamOptions()

         MessageStream messageStream = messageApi.stream(echo(true));

         while (messageStream.nextMarker().isPresent()) {
            assertEquals(Iterables.size(messageStream), 1);

            messageStream = messageApi.stream(messageStream.nextStreamOptions());
         }

         assertFalse(messageStream.nextMarker().isPresent());
      }
   }
View Full Code Here

Examples of org.jclouds.openstack.marconi.v1.domain.MessageStream.nextStreamOptions()

            for (Message message : messageStream) {
               messageIds.get(zoneId).add(message.getId());
            }

            messageStream = messageApi.stream(messageStream.nextStreamOptions());
         }

         assertFalse(messageStream.nextMarker().isPresent());
      }
   }
View Full Code Here

Examples of org.jclouds.openstack.marconi.v1.domain.MessageStream.nextStreamOptions()

         MessageStream messageStream = messageApi.stream();

         while (messageStream.nextMarker().isPresent()) {
            assertEquals(Iterables.size(messageStream), 6);

            messageStream = messageApi.stream(messageStream.nextStreamOptions());
         }

         assertFalse(messageStream.nextMarker().isPresent());

         assertEquals(server.getRequestCount(), 3);
View Full Code Here

Examples of org.jclouds.openstack.marconi.v1.domain.MessageStream.nextStreamOptions()

         MessageStream messageStream = messageApi.stream(limit(2));

         while (messageStream.nextMarker().isPresent()) {
            assertEquals(Iterables.size(messageStream), 2);

            messageStream = messageApi.stream(messageStream.nextStreamOptions());
         }

         assertFalse(messageStream.nextMarker().isPresent());

         assertEquals(server.getRequestCount(), 5);
View Full Code Here

Examples of org.jclouds.openstack.marconi.v1.domain.MessageStream.nextStreamOptions()

         MessageStream messageStream = messageApi.stream(echo(true));

         while(messageStream.nextMarker().isPresent()) {
            assertEquals(Iterables.size(messageStream), 1);

            messageStream = messageApi.stream(messageStream.nextStreamOptions());
         }

         assertFalse(messageStream.nextMarker().isPresent());
      }
   }
View Full Code Here

Examples of org.jclouds.openstack.marconi.v1.domain.MessageStream.nextStreamOptions()

            for (Message message: messageStream) {
               messageIds.get(zoneId).add(message.getId());
            }

            messageStream = messageApi.stream(messageStream.nextStreamOptions());
         }

         assertFalse(messageStream.nextMarker().isPresent());
      }
   }
View Full Code Here

Examples of org.jclouds.openstack.marconi.v1.domain.MessageStream.nextStreamOptions()

         while (consecutiveSleepCount < 3) {
            if (stream.nextMarker().isPresent()) {
               process(stream);
               consecutiveSleepCount = 0;
               streamMessagesOptions = stream.nextStreamOptions();
            }
            else {
               sleep(150);
               consecutiveSleepCount++;
               // leave the streamMessagesOptions from the previous loop as is so it can be used in the next loop
View Full Code Here

Examples of org.jclouds.openstack.marconi.v1.domain.MessageStream.nextStreamOptions()

               // Breaking here to illustrate how to resume using the marker below
               break;
            }
         }

         marker = stream.nextStreamOptions().getMarker();
         stream = messageApi.stream(stream.nextStreamOptions());
      }

      stream = messageApi.stream(marker(marker));
View Full Code Here

Examples of org.jclouds.openstack.marconi.v1.domain.MessageStream.nextStreamOptions()

               break;
            }
         }

         marker = stream.nextStreamOptions().getMarker();
         stream = messageApi.stream(stream.nextStreamOptions());
      }

      stream = messageApi.stream(marker(marker));

      while(stream.nextMarker().isPresent()) {
View Full Code Here

Examples of org.jclouds.openstack.marconi.v1.domain.MessageStream.nextStreamOptions()

            int messageNum = Integer.valueOf(messageProps.getProperty(MESSAGE_NUM));

            System.out.format("  Read message %d%n", messageNum);
         }

         stream = messageApi.stream(stream.nextStreamOptions());
      }
   }

   private void deleteQueue() {
      queueApi.delete(NAME);
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.