[concurrency-interest] Creating a Pipeline Using Executor Framework

Paulo Levi i30817 at gmail.com
Mon Jun 15 14:36:50 EDT 2009


Maybe i'm just simplifying your design too much, but when i needed to do
something similar i adapted Callable to be a Chain of Responsibility object.
When i needed to change ThreadPoolExecutor i added a "link" in the "chain"
that submitted it. When a chain failed i returned null and "cut" the chain.
When i needed explicit shutdown i overrided a shutdown method, (i had to
create a custom ThreadPoolExecutor to call this, the only nit on my design)
but this forced me sometimes to put blocking objects in the class state not
the run function (to be cancelled assynchronouly).

Just a few ideas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20090615/bc2c2f11/attachment.html>


More information about the Concurrency-interest mailing list