Dear experts,
There is recently a suggestion on the MES and MSES APIs that I would
like to get opinions from the expert group.
The idea was instead of having 7 new APIs in the ManagedExecutorService
and 4 in ManagedScheduledExecutorService whose only difference from the
ones in the super class in java.util.concurrent package was the addition
of an extra parameter for ManagedTaskListener, could we replace them
with an addTaskListener and removeTaskListener to the
ManagedExecutorService interface?
Pros:
- Much fewer new APIs in MES and MSES
- Easier to register same ManagedTaskListener to monitor events for all
task submissions. For example, an application can register a single
ManagedTaskListener to an MES receive all events related to task
submissions.
Cons:
- Becomes awkward when need to specify a different ManagedTaskListener
for each task submission
- Management of list of task listeners, especially if the MES is shared
across multiple applications and that applications that registers the
listener may be undeployed.
I tend to prefer the current APIs, but I would like to bring this up and
see if anyone have different opinions or suggestions.
Regards
Anthony