Java’s Executor is (as far as I understand it) an abstraction over the ThreadPool concept – something that can accept and carry out (execute) tasks.
I’m looking for a similar exception for the Polling concept. I need to continuously poll (dequeue) items out of a specific Queue (which does not implement BlockingQueue), execute them and sleep, and repeat all this until shutdown.
Is there a ready-made abstraction or should I write something on my own?
(Suggestions of a better title are welcome)
Polling is easy:
Perhaps you need to rephrase your question as I’m not quite sure exactly what it is you are trying to do?