esbtools / event-handler

Notification in, document out.
GNU General Public License v3.0
3 stars 6 forks source link

Add TransformableFuture.combined #66

Closed alechenninger closed 7 years ago

alechenninger commented 8 years ago

Please do not merge yet. Needs tests. Feel free to comment though.

This allows, among other things, for message implementations to share logic with types that produce TransformableFutures, and combine additional work on top of that. Put in other words, it allows any of our Future based APIs to be implemented with any number of Futures internally if they needed (rare but happens), as long as they are returned combined.

The semantics of a combined future is [hopefully] what you would expect, and follows Guava's Futures.allAsList. For example, cancel cancels all futures, isCancelled returns true if any of the futures are cancelled, isDone returns true only if all of the futures are done, etc.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-4.6%) to 56.036% when pulling 278a02cd7cd501fb7f26f2dc53305bbd67a84227 on combined-future into 813ed63dc73e3be542fe7808475209ee320832a2 on master.

alechenninger commented 8 years ago

I'm going to rework this a bit. Will come back to in later.