public interface ConnectionFuture<T> extends CompletionStage<T>, Future<T>
ConnectionFuture represents the result of an asynchronous connection initialization. The future provides a
StatefulConnection on successful completion. It also provides the remote SocketAddress.toCompletableFuturecancel, get, isCancelled, isDonestatic <T> ConnectionFuture<T> from(SocketAddress remoteAddress, CompletableFuture<T> delegate)
ConnectionFuture given SocketAddress and CompletableFuture holding the connection
progress.remoteAddress - initial connection endpoint, must not be null.delegate - must not be null.ConnectionFuture for SocketAddress and CompletableFuture.static <T> ConnectionFuture<T> completed(SocketAddress remoteAddress, T value)
remoteAddress - initial connection endpoint, must not be null.value - must not be null.ConnectionFuture for SocketAddress and value.T get() throws InterruptedException, ExecutionException
get in interface Future<T>CancellationException - if the computation was cancelledExecutionException - if the computation threw an exceptionInterruptedException - if the current thread was interrupted while waitingSocketAddress getRemoteAddress()
SocketAddress.SocketAddress. May be null until the socket address is resolved.T join()
CompletionException with the underlying exception as its cause.CancellationException - if the computation was cancelledCompletionException - if this future completed exceptionally or a completion computation threw an exception<U> ConnectionFuture<U> thenApply(Function<? super T,? extends U> fn)
thenApply in interface CompletionStage<T><U> ConnectionFuture<U> thenApplyAsync(Function<? super T,? extends U> fn)
thenApplyAsync in interface CompletionStage<T><U> ConnectionFuture<U> thenApplyAsync(Function<? super T,? extends U> fn, Executor executor)
thenApplyAsync in interface CompletionStage<T>ConnectionFuture<Void> thenAccept(Consumer<? super T> action)
thenAccept in interface CompletionStage<T>ConnectionFuture<Void> thenAcceptAsync(Consumer<? super T> action)
thenAcceptAsync in interface CompletionStage<T>ConnectionFuture<Void> thenAcceptAsync(Consumer<? super T> action, Executor executor)
thenAcceptAsync in interface CompletionStage<T>ConnectionFuture<Void> thenRun(Runnable action)
thenRun in interface CompletionStage<T>ConnectionFuture<Void> thenRunAsync(Runnable action)
thenRunAsync in interface CompletionStage<T>ConnectionFuture<Void> thenRunAsync(Runnable action, Executor executor)
thenRunAsync in interface CompletionStage<T><U,V> ConnectionFuture<V> thenCombine(CompletionStage<? extends U> other, BiFunction<? super T,? super U,? extends V> fn)
thenCombine in interface CompletionStage<T><U,V> ConnectionFuture<V> thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T,? super U,? extends V> fn)
thenCombineAsync in interface CompletionStage<T><U,V> ConnectionFuture<V> thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T,? super U,? extends V> fn, Executor executor)
thenCombineAsync in interface CompletionStage<T><U> ConnectionFuture<Void> thenAcceptBoth(CompletionStage<? extends U> other, BiConsumer<? super T,? super U> action)
thenAcceptBoth in interface CompletionStage<T><U> ConnectionFuture<Void> thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T,? super U> action)
thenAcceptBothAsync in interface CompletionStage<T><U> ConnectionFuture<Void> thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T,? super U> action, Executor executor)
thenAcceptBothAsync in interface CompletionStage<T>ConnectionFuture<Void> runAfterBoth(CompletionStage<?> other, Runnable action)
runAfterBoth in interface CompletionStage<T>ConnectionFuture<Void> runAfterBothAsync(CompletionStage<?> other, Runnable action)
runAfterBothAsync in interface CompletionStage<T>ConnectionFuture<Void> runAfterBothAsync(CompletionStage<?> other, Runnable action, Executor executor)
runAfterBothAsync in interface CompletionStage<T><U> ConnectionFuture<U> applyToEither(CompletionStage<? extends T> other, Function<? super T,U> fn)
applyToEither in interface CompletionStage<T><U> ConnectionFuture<U> applyToEitherAsync(CompletionStage<? extends T> other, Function<? super T,U> fn)
applyToEitherAsync in interface CompletionStage<T><U> ConnectionFuture<U> applyToEitherAsync(CompletionStage<? extends T> other, Function<? super T,U> fn, Executor executor)
applyToEitherAsync in interface CompletionStage<T>ConnectionFuture<Void> acceptEither(CompletionStage<? extends T> other, Consumer<? super T> action)
acceptEither in interface CompletionStage<T>ConnectionFuture<Void> acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action)
acceptEitherAsync in interface CompletionStage<T>ConnectionFuture<Void> acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action, Executor executor)
acceptEitherAsync in interface CompletionStage<T>ConnectionFuture<Void> runAfterEither(CompletionStage<?> other, Runnable action)
runAfterEither in interface CompletionStage<T>ConnectionFuture<Void> runAfterEitherAsync(CompletionStage<?> other, Runnable action)
runAfterEitherAsync in interface CompletionStage<T>ConnectionFuture<Void> runAfterEitherAsync(CompletionStage<?> other, Runnable action, Executor executor)
runAfterEitherAsync in interface CompletionStage<T><U> ConnectionFuture<U> thenCompose(Function<? super T,? extends CompletionStage<U>> fn)
thenCompose in interface CompletionStage<T><U> ConnectionFuture<U> thenCompose(BiFunction<? super T,? super Throwable,? extends CompletionStage<U>> fn)
<U> ConnectionFuture<U> thenComposeAsync(Function<? super T,? extends CompletionStage<U>> fn)
thenComposeAsync in interface CompletionStage<T><U> ConnectionFuture<U> thenComposeAsync(Function<? super T,? extends CompletionStage<U>> fn, Executor executor)
thenComposeAsync in interface CompletionStage<T>ConnectionFuture<T> exceptionally(Function<Throwable,? extends T> fn)
exceptionally in interface CompletionStage<T>ConnectionFuture<T> whenComplete(BiConsumer<? super T,? super Throwable> action)
whenComplete in interface CompletionStage<T>ConnectionFuture<T> whenCompleteAsync(BiConsumer<? super T,? super Throwable> action)
whenCompleteAsync in interface CompletionStage<T>ConnectionFuture<T> whenCompleteAsync(BiConsumer<? super T,? super Throwable> action, Executor executor)
whenCompleteAsync in interface CompletionStage<T><U> ConnectionFuture<U> handle(BiFunction<? super T,Throwable,? extends U> fn)
handle in interface CompletionStage<T><U> ConnectionFuture<U> handleAsync(BiFunction<? super T,Throwable,? extends U> fn)
handleAsync in interface CompletionStage<T><U> ConnectionFuture<U> handleAsync(BiFunction<? super T,Throwable,? extends U> fn, Executor executor)
handleAsync in interface CompletionStage<T>Copyright © 2020 lettuce.io. All rights reserved.