In my Jetty service, I have an endpoint that runs multiple threads to run. I am currently using ThreadExecutorPoolto execute my Runnables. But I want to know how many jobs are left for each individual request to the endpoint and allow multiple simultaneous requests.
My idea is to do something like a separate queue for each request and have my own executor who simply extracts from each queue cyclically. I am wondering if something like that exists that works out of the box.
Please note that I do not need the execution order. I take care that every request (that is, a session) is given equal time and that for each session I can find out how many threads have not yet started / completed.
So, I think MultiQueueExecutor or something like that?
source
share