This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Queue up messages based on a field  RSS feed

 
Hansel Tizer
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a number of threads delivering messages to my app.

Each message is basically an Object with an id.

I need to create a single queue for messages related to that id.
i.e. each queue will only contain Objects with the same ID.

Any advice/code samples appreciated.

Thanks.
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like you want a Map<ID, Queue>.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!