netty5/common
Norman Maurer 81244e1ae1
Introduce Future.toStage() which allows to obtain a CompletionStage a… (#9004)
Motivation:

CompletionStage is the new standard for async operation chaining in JDK8+ that is supported by various of libs. To make it easer to interopt with other libs and to allow users to make good use of lambdas and functional programming style we should allow to convert from our Future to a CompletionStage while still provide the same ordering guarantees.

The reason why we expose this as toStage() and not jus have Future extend CompletionStage is for two reasons:
 - Keep our interface norrow
 - Keep semantics clear (Future.addListener(...) methods return this while all chaining methods of CompletionStage return a new instance).

Modifications:

- Merge implements in AbstractFuture to Future (by make these default methods)
- Add Future.toStage() as a default method and a special implemention in DefaultPromise (to reduce GC).
- Add Future.executor() which returns the EventExecutor that is pinned to the Future
- Introduce FutureCompletionStage that extends CompletionStage to clarify threading semantics and guarantees.

Result:

Easier inter-op with other Java8+ libaries. Related to https://github.com/netty/netty/issues/8523.
2019-04-11 14:52:33 +02:00
..
src Introduce Future.toStage() which allows to obtain a CompletionStage a… (#9004) 2019-04-11 14:52:33 +02:00
pom.xml Update version number to start working on Netty 5 2018-11-20 15:49:57 +01:00