Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Module : java.base - Package : java.util.concurrent
Version documentée : Java SE 17

Classe « CompletableFuture<T> »

Informations générales

Héritage

java.lang.Object
    java.util.concurrent.CompletableFuture

Interfaces implémentées

java.util.concurrent.CompletionStage<T>
java.util.concurrent.Future<T>

Définition

public class CompletableFuture<T> extends java.lang.Object
implements java.util.concurrent.CompletionStage<T>,
java.util.concurrent.Future<T>

Description

A venir.

Liste des attributs

Tous les attributs Attributs d'instance Attributs statiques Attributs dépréciés
QualificateursTypeNomDescription

Liste des constructeurs

Constructeurs Constructeurs dépréciés
ConstructeurDescription
CompletableFuture()

Liste des propriétés (getters/setters)

Propriétés Propriétés dépréciées
QualificateursTypeNomR/W
public boolean cancelled R/-
public boolean completedExceptionally R/-
public boolean done R/-
public int numberOfDependents R/-

Propriétés héritées de la classe java.lang.Object

class

Liste des méthodes

Toutes les méthodes Méthodes d'instance Méthodes statiques Méthodes concrètes Méthodes abstraites Méthodes dépréciées
QualificateursType de retourPrototype de la méthodeDescription
public CompletableFuture<java.lang.Void> acceptEither( CompletionStage<? extends T> other, Consumer<? super T> action )
public CompletableFuture<java.lang.Void> acceptEitherAsync( CompletionStage<? extends T> other, Consumer<? super T> action, Executor executor )
public CompletableFuture<java.lang.Void> acceptEitherAsync( CompletionStage<? extends T> other, Consumer<? super T> action )
public static CompletableFuture<java.lang.Void> allOf( CompletableFuture<?>[] cfs )
public static CompletableFuture<java.lang.Object> anyOf( CompletableFuture<?>[] cfs )
public <U> CompletableFuture<U> applyToEither( CompletionStage<? extends T> other, Function<? super T, U> fn )
public <U> CompletableFuture<U> applyToEitherAsync( CompletionStage<? extends T> other, Function<? super T, U> fn )
public <U> CompletableFuture<U> applyToEitherAsync( CompletionStage<? extends T> other, Function<? super T, U> fn, Executor executor )
public boolean cancel( boolean mayInterruptIfRunning )
public boolean complete( T arg0 )
public CompletableFuture<T> completeAsync( Supplier<? extends T> supplier )
public CompletableFuture<T> completeAsync( Supplier<? extends T> supplier, Executor executor )
public static <U> CompletableFuture<U> completedFuture( U arg0 )
public static <U> CompletionStage<U> completedStage( U arg0 )
public boolean completeExceptionally( Throwable ex )
public CompletableFuture<T> completeOnTimeout( T value, long timeout, TimeUnit unit )
public CompletableFuture<T> copy()
public Executor defaultExecutor()
public static Executor delayedExecutor( long delay, TimeUnit unit, Executor executor )
public static Executor delayedExecutor( long delay, TimeUnit unit )
public CompletableFuture<T> exceptionally( Function<java.lang.Throwable, ? extends T> fn )
public CompletableFuture<T> exceptionallyAsync( Function<java.lang.Throwable, ? extends T> fn )
public CompletableFuture<T> exceptionallyAsync( Function<java.lang.Throwable, ? extends T> fn, Executor executor )
public CompletableFuture<T> exceptionallyCompose( Function<java.lang.Throwable, ? extends java.util.concurrent.CompletionStage<T>> fn )
public CompletableFuture<T> exceptionallyComposeAsync( Function<java.lang.Throwable, ? extends java.util.concurrent.CompletionStage<T>> fn, Executor executor )
public CompletableFuture<T> exceptionallyComposeAsync( Function<java.lang.Throwable, ? extends java.util.concurrent.CompletionStage<T>> fn )
public static <U> CompletableFuture<U> failedFuture( Throwable ex )
public static <U> CompletionStage<U> failedStage( Throwable ex )
public T get()
public T get( long timeout, TimeUnit unit )
public T getNow( T arg0 )
public int getNumberOfDependents()
public <U> CompletableFuture<U> handle( BiFunction<? super T, java.lang.Throwable, ? extends U> fn )
public <U> CompletableFuture<U> handleAsync( BiFunction<? super T, java.lang.Throwable, ? extends U> fn, Executor executor )
public <U> CompletableFuture<U> handleAsync( BiFunction<? super T, java.lang.Throwable, ? extends U> fn )
public boolean isCancelled()
public boolean isCompletedExceptionally()
public boolean isDone()
public T join()
public CompletionStage<T> minimalCompletionStage()
public <U> CompletableFuture<U> newIncompleteFuture()
public void obtrudeException( Throwable ex )
public void obtrudeValue( T arg0 )
public CompletableFuture<T> orTimeout( long timeout, TimeUnit unit )
public CompletableFuture<java.lang.Void> runAfterBoth( CompletionStage<?> other, Runnable action )
public CompletableFuture<java.lang.Void> runAfterBothAsync( CompletionStage<?> other, Runnable action, Executor executor )
public CompletableFuture<java.lang.Void> runAfterBothAsync( CompletionStage<?> other, Runnable action )
public CompletableFuture<java.lang.Void> runAfterEither( CompletionStage<?> other, Runnable action )
public CompletableFuture<java.lang.Void> runAfterEitherAsync( CompletionStage<?> other, Runnable action, Executor executor )
public CompletableFuture<java.lang.Void> runAfterEitherAsync( CompletionStage<?> other, Runnable action )
public static CompletableFuture<java.lang.Void> runAsync( Runnable runnable, Executor executor )
public static CompletableFuture<java.lang.Void> runAsync( Runnable runnable )
public static <U> CompletableFuture<U> supplyAsync( Supplier<U> supplier, Executor executor )
public static <U> CompletableFuture<U> supplyAsync( Supplier<U> supplier )
public CompletableFuture<java.lang.Void> thenAccept( Consumer<? super T> action )
public CompletableFuture<java.lang.Void> thenAcceptAsync( Consumer<? super T> action )
public CompletableFuture<java.lang.Void> thenAcceptAsync( Consumer<? super T> action, Executor executor )
public <U> CompletableFuture<java.lang.Void> thenAcceptBoth( CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action )
public <U> CompletableFuture<java.lang.Void> thenAcceptBothAsync( CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action )
public <U> CompletableFuture<java.lang.Void> thenAcceptBothAsync( CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action, Executor executor )
public <U> CompletableFuture<U> thenApply( Function<? super T, ? extends U> fn )
public <U> CompletableFuture<U> thenApplyAsync( Function<? super T, ? extends U> fn, Executor executor )
public <U> CompletableFuture<U> thenApplyAsync( Function<? super T, ? extends U> fn )
public <U, V> CompletableFuture<V> thenCombine( CompletionStage<? extends U> other, BiFunction<? super T, ? super U, ? extends V> fn )
public <U, V> CompletableFuture<V> thenCombineAsync( CompletionStage<? extends U> other, BiFunction<? super T, ? super U, ? extends V> fn, Executor executor )
public <U, V> CompletableFuture<V> thenCombineAsync( CompletionStage<? extends U> other, BiFunction<? super T, ? super U, ? extends V> fn )
public <U> CompletableFuture<U> thenCompose( Function<? super T, ? extends java.util.concurrent.CompletionStage<U>> fn )
public <U> CompletableFuture<U> thenComposeAsync( Function<? super T, ? extends java.util.concurrent.CompletionStage<U>> fn, Executor executor )
public <U> CompletableFuture<U> thenComposeAsync( Function<? super T, ? extends java.util.concurrent.CompletionStage<U>> fn )
public CompletableFuture<java.lang.Void> thenRun( Runnable action )
public CompletableFuture<java.lang.Void> thenRunAsync( Runnable action )
public CompletableFuture<java.lang.Void> thenRunAsync( Runnable action, Executor executor )
public CompletableFuture<T> toCompletableFuture()
public String toString()
public CompletableFuture<T> whenComplete( BiConsumer<? super T, ? super java.lang.Throwable> action )
public CompletableFuture<T> whenCompleteAsync( BiConsumer<? super T, ? super java.lang.Throwable> action )
public CompletableFuture<T> whenCompleteAsync( BiConsumer<? super T, ? super java.lang.Throwable> action, Executor executor )

Méthodes héritées de la classe java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait