title: Java Algorithm for Batch Numbering
body: <p>I have little unusual problem to solve. I need some hint or links to get started with. I have queue with 10 data slots. Once the queue is full I need to send it to a server. However, along with that data, I also send start and end sequence number. Now, this numbers must be unique and in increment order. So, for the first send, start = 1, and end = 10. On second send, it would be start = 11, end = 20, and so on. Once the data from the queue is send, new entries will be recorded from the index 0 in the queue.</p>
  
  <p>How do I solve this efficiently ?</p>