racorn opened a new pull request #8137:
URL: https://github.com/apache/pulsar/pull/8137
### Motivation
Pulsar code uses `CompletableFuture` to implement asynchronous execution
paths. When interacting with Netty, a common pattern is to create a
`CompletableFuture` and some glue code to listen for Netty `ChannelFuture`
completions and then complete the `CompletableFuture`. The code would be more
ease to read if we add static utility class for adapting a
`io.netty.channel.ChannelFuture` to a `java.util.concurrent.CompletableFuture`.
### Modifications
- Added `org.apache.pulsar.common.util.netty.ChannelFutures`
### Verifying this change
- Added test class `ChannelFuturesTest`
### Documentation
- JavaDocs
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]