public final class LazyResetableFuture<T> extends LazyResetable<CompletableFuture<T>> implements CompletionStage<T>
join() method for
 convenience.CompletionStage keep a reference to the original LazyResetableFuture so they
 should be used with caution to avoid memory leaks.| Constructor and Description | 
|---|
LazyResetableFuture(Supplier<CompletableFuture<T>> supplier)
Creates a LazyResetableFuture using SUPPLIER. 
 | 
created, getInternal, resetpublic LazyResetableFuture(Supplier<CompletableFuture<T>> supplier)
supplier - Supplier of the value. May be called multiple times on failure.public static <T> LazyResetableFuture<T> completedFuture(T value)
T - Value's type.value - The resulting value.public static <T> LazyResetableFuture<T> startedFuture(CompletableFuture<T> future)
T - Value's type.future - The future.public T join()
public boolean isDone()
true if completed and data is available. false otherwise.public <U> LazyResetableFuture<U> thenApply(Function<? super T,? extends U> fn)
thenApply in interface CompletionStage<T>public <U> LazyResetableFuture<U> thenApplyAsync(Function<? super T,? extends U> fn)
thenApplyAsync in interface CompletionStage<T>public <U> LazyResetableFuture<U> thenApplyAsync(Function<? super T,? extends U> fn, Executor executor)
thenApplyAsync in interface CompletionStage<T>public LazyResetableFuture<Void> thenAccept(Consumer<? super T> action)
thenAccept in interface CompletionStage<T>public LazyResetableFuture<Void> thenAcceptAsync(Consumer<? super T> action)
thenAcceptAsync in interface CompletionStage<T>public LazyResetableFuture<Void> thenAcceptAsync(Consumer<? super T> action, Executor executor)
thenAcceptAsync in interface CompletionStage<T>public LazyResetableFuture<Void> thenRun(Runnable action)
thenRun in interface CompletionStage<T>public LazyResetableFuture<Void> thenRunAsync(Runnable action)
thenRunAsync in interface CompletionStage<T>public LazyResetableFuture<Void> thenRunAsync(Runnable action, Executor executor)
thenRunAsync in interface CompletionStage<T>public <U,V> LazyResetableFuture<V> thenCombine(CompletionStage<? extends U> other, BiFunction<? super T,? super U,? extends V> fn)
thenCombine in interface CompletionStage<T>public <U,V> LazyResetableFuture<V> thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T,? super U,? extends V> fn)
thenCombineAsync in interface CompletionStage<T>public <U,V> LazyResetableFuture<V> thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T,? super U,? extends V> fn, Executor executor)
thenCombineAsync in interface CompletionStage<T>public <U> LazyResetableFuture<Void> thenAcceptBoth(CompletionStage<? extends U> other, BiConsumer<? super T,? super U> action)
thenAcceptBoth in interface CompletionStage<T>public <U> LazyResetableFuture<Void> thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T,? super U> action)
thenAcceptBothAsync in interface CompletionStage<T>public <U> LazyResetableFuture<Void> thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T,? super U> action, Executor executor)
thenAcceptBothAsync in interface CompletionStage<T>public LazyResetableFuture<Void> runAfterBoth(CompletionStage<?> other, Runnable action)
runAfterBoth in interface CompletionStage<T>public LazyResetableFuture<Void> runAfterBothAsync(CompletionStage<?> other, Runnable action)
runAfterBothAsync in interface CompletionStage<T>public LazyResetableFuture<Void> runAfterBothAsync(CompletionStage<?> other, Runnable action, Executor executor)
runAfterBothAsync in interface CompletionStage<T>public <U> LazyResetableFuture<U> applyToEither(CompletionStage<? extends T> other, Function<? super T,U> fn)
applyToEither in interface CompletionStage<T>public <U> LazyResetableFuture<U> applyToEitherAsync(CompletionStage<? extends T> other, Function<? super T,U> fn)
applyToEitherAsync in interface CompletionStage<T>public <U> LazyResetableFuture<U> applyToEitherAsync(CompletionStage<? extends T> other, Function<? super T,U> fn, Executor executor)
applyToEitherAsync in interface CompletionStage<T>public LazyResetableFuture<Void> acceptEither(CompletionStage<? extends T> other, Consumer<? super T> action)
acceptEither in interface CompletionStage<T>public LazyResetableFuture<Void> acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action)
acceptEitherAsync in interface CompletionStage<T>public LazyResetableFuture<Void> acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action, Executor executor)
acceptEitherAsync in interface CompletionStage<T>public LazyResetableFuture<Void> runAfterEither(CompletionStage<?> other, Runnable action)
runAfterEither in interface CompletionStage<T>public LazyResetableFuture<Void> runAfterEitherAsync(CompletionStage<?> other, Runnable action)
runAfterEitherAsync in interface CompletionStage<T>public LazyResetableFuture<Void> runAfterEitherAsync(CompletionStage<?> other, Runnable action, Executor executor)
runAfterEitherAsync in interface CompletionStage<T>public <U> LazyResetableFuture<U> thenCompose(Function<? super T,? extends CompletionStage<U>> fn)
thenCompose in interface CompletionStage<T>public <U> LazyResetableFuture<U> thenComposeAsync(Function<? super T,? extends CompletionStage<U>> fn)
thenComposeAsync in interface CompletionStage<T>public <U> LazyResetableFuture<U> thenComposeAsync(Function<? super T,? extends CompletionStage<U>> fn, Executor executor)
thenComposeAsync in interface CompletionStage<T>public LazyResetableFuture<T> exceptionally(Function<Throwable,? extends T> fn)
exceptionally in interface CompletionStage<T>public LazyResetableFuture<T> whenComplete(BiConsumer<? super T,? super Throwable> action)
whenComplete in interface CompletionStage<T>public LazyResetableFuture<T> whenCompleteAsync(BiConsumer<? super T,? super Throwable> action)
whenCompleteAsync in interface CompletionStage<T>public LazyResetableFuture<T> whenCompleteAsync(BiConsumer<? super T,? super Throwable> action, Executor executor)
whenCompleteAsync in interface CompletionStage<T>public <U> LazyResetableFuture<U> handle(BiFunction<? super T,Throwable,? extends U> fn)
handle in interface CompletionStage<T>public <U> LazyResetableFuture<U> handleAsync(BiFunction<? super T,Throwable,? extends U> fn)
handleAsync in interface CompletionStage<T>public <U> LazyResetableFuture<U> handleAsync(BiFunction<? super T,Throwable,? extends U> fn, Executor executor)
handleAsync in interface CompletionStage<T>public CompletableFuture<T> toCompletableFuture()
toCompletableFuture in interface CompletionStage<T>Copyright © 2019. All rights reserved.