Package com.linkedin.alpini.netty4.misc
Class Futures
java.lang.Object
com.linkedin.alpini.netty4.misc.Futures
Created by acurtis on 2/1/17.
-
Method Summary
Modifier and TypeMethodDescriptionstatic io.netty.util.concurrent.Future<Void>
allOf
(io.netty.util.concurrent.EventExecutor eventExecutor, io.netty.util.concurrent.Future<?>... futures) static io.netty.util.concurrent.Future<Void>
allOf
(io.netty.util.concurrent.Future<?>... futures) static io.netty.util.concurrent.Future<?>
anyOf
(io.netty.util.concurrent.Future<?>... futures) static <T> CompletableFuture<T>
asCompletableFuture
(io.netty.util.concurrent.Future<T> future) static <T> io.netty.util.concurrent.Future<T>
asNettyFuture
(io.netty.util.concurrent.EventExecutor eventExecutor, CompletableFuture<T> completableFuture) static <T> io.netty.util.concurrent.Future<T>
asNettyFuture
(CompletableFuture<T> completableFuture) static <V> BiConsumer<V,
Throwable> complete
(io.netty.util.concurrent.Promise<V> promise) static <V> BiConsumer<V,
Throwable> static <V> BiConsumer<io.netty.util.concurrent.Future<V>,
Throwable> completeFuture
(io.netty.util.concurrent.Promise<V> promise) static <V> io.netty.util.concurrent.FutureListener<V>
listener
(io.netty.util.concurrent.Promise<V> promise) static <V> io.netty.util.concurrent.FutureListener<V>
static <V> io.netty.util.concurrent.FutureListener<V>
listener
(CompletableFuture<V> completableFuture) static <V> io.netty.util.concurrent.FutureListener<V>
listener
(CompletableFuture<V> completableFuture, Consumer<V> dispose) static <T,
V> io.netty.util.concurrent.FutureListener<T> voidListener
(io.netty.util.concurrent.Promise<V> promise)
-
Method Details
-
asCompletableFuture
public static <T> CompletableFuture<T> asCompletableFuture(io.netty.util.concurrent.Future<T> future) -
asNettyFuture
public static <T> io.netty.util.concurrent.Future<T> asNettyFuture(@Nonnull CompletableFuture<T> completableFuture) -
asNettyFuture
public static <T> io.netty.util.concurrent.Future<T> asNettyFuture(@Nonnull io.netty.util.concurrent.EventExecutor eventExecutor, @Nonnull CompletableFuture<T> completableFuture) -
allOf
public static io.netty.util.concurrent.Future<Void> allOf(io.netty.util.concurrent.Future<?>... futures) -
allOf
public static io.netty.util.concurrent.Future<Void> allOf(@Nonnull io.netty.util.concurrent.EventExecutor eventExecutor, io.netty.util.concurrent.Future<?>... futures) -
anyOf
public static io.netty.util.concurrent.Future<?> anyOf(io.netty.util.concurrent.Future<?>... futures) -
complete
public static <V> BiConsumer<V,Throwable> complete(@Nonnull io.netty.util.concurrent.Promise<V> promise) -
complete
public static <V> BiConsumer<V,Throwable> complete(@Nonnull io.netty.util.concurrent.Promise<V> promise, @Nonnull Consumer<V> dispose) -
completeFuture
public static <V> BiConsumer<io.netty.util.concurrent.Future<V>,Throwable> completeFuture(@Nonnull io.netty.util.concurrent.Promise<V> promise) -
voidListener
public static <T,V> io.netty.util.concurrent.FutureListener<T> voidListener(@Nonnull io.netty.util.concurrent.Promise<V> promise) -
listener
public static <V> io.netty.util.concurrent.FutureListener<V> listener(@Nonnull io.netty.util.concurrent.Promise<V> promise) -
listener
public static <V> io.netty.util.concurrent.FutureListener<V> listener(@Nonnull io.netty.util.concurrent.Promise<V> promise, @Nonnull Consumer<V> dispose) -
listener
public static <V> io.netty.util.concurrent.FutureListener<V> listener(@Nonnull CompletableFuture<V> completableFuture) -
listener
public static <V> io.netty.util.concurrent.FutureListener<V> listener(@Nonnull CompletableFuture<V> completableFuture, @Nonnull Consumer<V> dispose)
-