ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/CompletableFuture.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/CompletableFuture.java (file contents):
Revision 1.181 by jsr166, Sun Jan 24 22:41:31 2016 UTC vs.
Revision 1.182 by jsr166, Fri Jan 29 20:06:49 2016 UTC

# Line 2401 | Line 2401 | public class CompletableFuture<T> implem
2401       *
2402       * @param <U> the type of the value
2403       * @return a new CompletableFuture
2404 <     * @since 1.9
2404 >     * @since 9
2405       */
2406      public <U> CompletableFuture<U> newIncompleteFuture() {
2407          return new CompletableFuture<U>();
# Line 2416 | Line 2416 | public class CompletableFuture<T> implem
2416       * an Executor that provides at least one independent thread.
2417       *
2418       * @return the executor
2419 <     * @since 1.9
2419 >     * @since 9
2420       */
2421      public Executor defaultExecutor() {
2422          return ASYNC_POOL;
# Line 2434 | Line 2434 | public class CompletableFuture<T> implem
2434       * arrange dependent actions.
2435       *
2436       * @return the new CompletableFuture
2437 <     * @since 1.9
2437 >     * @since 9
2438       */
2439      public CompletableFuture<T> copy() {
2440          return uniCopyStage();
# Line 2451 | Line 2451 | public class CompletableFuture<T> implem
2451       * cause.
2452       *
2453       * @return the new CompletionStage
2454 <     * @since 1.9
2454 >     * @since 9
2455       */
2456      public CompletionStage<T> minimalCompletionStage() {
2457          return uniAsMinimalStage();
# Line 2466 | Line 2466 | public class CompletableFuture<T> implem
2466       * to complete this CompletableFuture
2467       * @param executor the executor to use for asynchronous execution
2468       * @return this CompletableFuture
2469 <     * @since 1.9
2469 >     * @since 9
2470       */
2471      public CompletableFuture<T> completeAsync(Supplier<? extends T> supplier,
2472                                                Executor executor) {
# Line 2484 | Line 2484 | public class CompletableFuture<T> implem
2484       * @param supplier a function returning the value to be used
2485       * to complete this CompletableFuture
2486       * @return this CompletableFuture
2487 <     * @since 1.9
2487 >     * @since 9
2488       */
2489      public CompletableFuture<T> completeAsync(Supplier<? extends T> supplier) {
2490          return completeAsync(supplier, defaultExecutor());
# Line 2500 | Line 2500 | public class CompletableFuture<T> implem
2500       * @param unit a {@code TimeUnit} determining how to interpret the
2501       *        {@code timeout} parameter
2502       * @return this CompletableFuture
2503 <     * @since 1.9
2503 >     * @since 9
2504       */
2505      public CompletableFuture<T> orTimeout(long timeout, TimeUnit unit) {
2506          if (unit == null)
# Line 2521 | Line 2521 | public class CompletableFuture<T> implem
2521       * @param unit a {@code TimeUnit} determining how to interpret the
2522       *        {@code timeout} parameter
2523       * @return this CompletableFuture
2524 <     * @since 1.9
2524 >     * @since 9
2525       */
2526      public CompletableFuture<T> completeOnTimeout(T value, long timeout,
2527                                                    TimeUnit unit) {
# Line 2545 | Line 2545 | public class CompletableFuture<T> implem
2545       *        {@code delay} parameter
2546       * @param executor the base executor
2547       * @return the new delayed executor
2548 <     * @since 1.9
2548 >     * @since 9
2549       */
2550      public static Executor delayedExecutor(long delay, TimeUnit unit,
2551                                             Executor executor) {
# Line 2564 | Line 2564 | public class CompletableFuture<T> implem
2564       * @param unit a {@code TimeUnit} determining how to interpret the
2565       *        {@code delay} parameter
2566       * @return the new delayed executor
2567 <     * @since 1.9
2567 >     * @since 9
2568       */
2569      public static Executor delayedExecutor(long delay, TimeUnit unit) {
2570          if (unit == null)
# Line 2580 | Line 2580 | public class CompletableFuture<T> implem
2580       * @param value the value
2581       * @param <U> the type of the value
2582       * @return the completed CompletionStage
2583 <     * @since 1.9
2583 >     * @since 9
2584       */
2585      public static <U> CompletionStage<U> completedStage(U value) {
2586          return new MinimalStage<U>((value == null) ? NIL : value);
# Line 2593 | Line 2593 | public class CompletableFuture<T> implem
2593       * @param ex the exception
2594       * @param <U> the type of the value
2595       * @return the exceptionally completed CompletableFuture
2596 <     * @since 1.9
2596 >     * @since 9
2597       */
2598      public static <U> CompletableFuture<U> failedFuture(Throwable ex) {
2599          if (ex == null) throw new NullPointerException();
# Line 2608 | Line 2608 | public class CompletableFuture<T> implem
2608       * @param ex the exception
2609       * @param <U> the type of the value
2610       * @return the exceptionally completed CompletionStage
2611 <     * @since 1.9
2611 >     * @since 9
2612       */
2613      public static <U> CompletionStage<U> failedStage(Throwable ex) {
2614          if (ex == null) throw new NullPointerException();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines