android/java – Find efficient concurrent loop queues… here is a solution to the problem.
android/java – Find efficient concurrent loop queues
Does anyone know of a (open source) implementation of a bounded consistent loop queue, or an available API class built into android/java?
The concurrent (non-synchronous or lock-based) operations I need for this set are at least enqueue and dequeue, but enqueue is enough.
For those who aren’t sure which Collection I need, here is some more information:
- bounded – There is the maximum number of items that can be inside.
- Concurrency – Allows multiple threads to run operations efficiently without any type of locking. This is in contrast to the synchronous solution, which only allows a single thread to run operations.
- Loop – If we put an item into a populated collection, the new item replaces the oldest item.
Please help