I've written and done a little special testing of a new version of
TaskManager, http://www.patriciashanahan.com/apache/NewTaskManager.java
This one changes the TaskManager.Task interface to a static nested
class. The main benefit is allowing TaskManager to track its own Task
related data in TaskManager.Task's private fields, avoiding the need for
a separate task wrapper.
It also has some TaskManager user benefits.
The new version supplies a default version of runAfter that reports no
dependencies. That will get rid of a lot of dummy runAfter methods in
the using code. Having a single implementation of the trivial runAfter
method will make it much easier to find the non-trivial implementations.
It also allows the option of a method to report the state of a task,
which might be useful e.g. for logging and assertions. I have a private
enum field in TaskManager.Task that could be given a public getState method.
One disadvantage is that only one add of a Task is allowed at a time. In
theory, the old TaskManager could support multiple adds before older
adds had finished. In practice, none of the existing uses mess with
anything that confusing.
The next step is to modify the rest of the River code to use it. I've
also written a minimum change version of the existing TaskManager that
uses the same interface, so that I can implement, test, and commit the
changes to the using code in a low risk fashion.
I assume the head revision of Peter's pepe branch is as good a version
as any to start from?
Patricia