Class ChannelFutures
java.lang.Object
org.apache.pulsar.common.util.netty.ChannelFutures
Static utility methods for operating on
ChannelFuture
s.-
Method Summary
Modifier and TypeMethodDescriptionstatic CompletableFuture<io.netty.channel.Channel>
toCompletableFuture
(io.netty.channel.ChannelFuture channelFuture) Convert aChannelFuture
into aCompletableFuture
.
-
Method Details
-
toCompletableFuture
public static CompletableFuture<io.netty.channel.Channel> toCompletableFuture(io.netty.channel.ChannelFuture channelFuture) Convert aChannelFuture
into aCompletableFuture
.- Parameters:
channelFuture
- theChannelFuture
- Returns:
- a
CompletableFuture
that completes successfully when the channelFuture completes successfully, and completes exceptionally if the channelFuture completes with aThrowable
-