Reputation: 1
Is there a way to judge whether all the events have been consumed? Similar to the BlockingQueue.isEmpty() method. I want to add some business logic when consumers are idle. Looking forward to your reply.
Upvotes: 0
Views: 96
Reputation: 843
Yes, the ringbuffer has remainingCapacity which tells you how many slots remain free. So you would then need to compare that to the capacity of the ring buffer to check if its empty.
Upvotes: 1