I am looking for a WorkQueue API offering the following features:
java.util.Queue
compatibleThere are a lot of interesting implementations in the jdk, e.g. java.util.DelayQueue
which i could use. I just wanted to make sure i am not reinventing the wheel.
Have a look at Quartz Job Scheduler API
Quartz Features : http://www.quartz-scheduler.org/overview/features.html
I am not sure about its java.util.Queue compatibility. But it provides most of features related to Job scheduling and execution.
Are you still looking for an answer to accept?
I think your needs would best be met using java.util.concurrent
's executor framework. See the API (here's a good start). There's an excellent support community, you can find it at the concurrency-interest web site. If you're into dead trees, Java Concurrency in Practice (JCiP) provides an excellent resource.
The executor framework allows you to create tasks (in the form of Runnables or Callables), provides several schemes for synchronizing or otherwise ordering tasks with respect to one another.
Finally, the emerging ForkJoin (FJ) infrastructure is quite usable and may match your needs. API is here, a good paper is here, and an introductory article here.
Hope this helps.
JA
Short and straight answer - no. You have to roll out your own or you are just going to serve as a free tester for someone else's experiments. So at least you'll spend time making a system exactly for your needs, knowing all core parts and being in full control instead of taking in big and unknown dependency.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With