Guest User

Untitled

a guest
Jun 21st, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. Collection<Request> bundle = new ArrayList<Request>();
  2. bundle.add(queue.take());
  3. while (bundle.size() < BUNDLE_MAX) {
  4. Request req = queue.poll(EXTRA, TimeUnit.MILLISECONDS);
  5. if (req == null)
  6. break;
  7. bundle.add(req);
  8. }
  9. /* Now make one service request with contents of "bundle". */
Add Comment
Please, Sign In to add comment