< prev index next >
jdk/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java
Print this page
@@ -2427,11 +2427,11 @@
* class as this CompletableFuture. The default implementation
* returns an instance of class CompletableFuture.
*
* @param <U> the type of the value
* @return a new CompletableFuture
- * @since 1.9
+ * @since 9
*/
public <U> CompletableFuture<U> newIncompleteFuture() {
return new CompletableFuture<U>();
}
@@ -2442,11 +2442,11 @@
* parallel thread, or else an Executor using one thread per async
* task. This method may be overridden in subclasses to return
* an Executor that provides at least one independent thread.
*
* @return the executor
- * @since 1.9
+ * @since 9
*/
public Executor defaultExecutor() {
return ASYNC_POOL;
}
@@ -2460,11 +2460,11 @@
* method may be useful as a form of "defensive copying", to
* prevent clients from completing, while still being able to
* arrange dependent actions.
*
* @return the new CompletableFuture
- * @since 1.9
+ * @since 9
*/
public CompletableFuture<T> copy() {
return uniCopyStage();
}
@@ -2477,11 +2477,11 @@
* exceptionally, then the returned CompletionStage completes
* exceptionally with a CompletionException with this exception as
* cause.
*
* @return the new CompletionStage
- * @since 1.9
+ * @since 9
*/
public CompletionStage<T> minimalCompletionStage() {
return uniAsMinimalStage();
}
@@ -2492,11 +2492,11 @@
*
* @param supplier a function returning the value to be used
* to complete this CompletableFuture
* @param executor the executor to use for asynchronous execution
* @return this CompletableFuture
- * @since 1.9
+ * @since 9
*/
public CompletableFuture<T> completeAsync(Supplier<? extends T> supplier,
Executor executor) {
if (supplier == null || executor == null)
throw new NullPointerException();
@@ -2510,11 +2510,11 @@
* default executor.
*
* @param supplier a function returning the value to be used
* to complete this CompletableFuture
* @return this CompletableFuture
- * @since 1.9
+ * @since 9
*/
public CompletableFuture<T> completeAsync(Supplier<? extends T> supplier) {
return completeAsync(supplier, defaultExecutor());
}
@@ -2526,11 +2526,11 @@
* @param timeout how long to wait before completing exceptionally
* with a TimeoutException, in units of {@code unit}
* @param unit a {@code TimeUnit} determining how to interpret the
* {@code timeout} parameter
* @return this CompletableFuture
- * @since 1.9
+ * @since 9
*/
public CompletableFuture<T> orTimeout(long timeout, TimeUnit unit) {
if (unit == null)
throw new NullPointerException();
if (result == null)
@@ -2547,11 +2547,11 @@
* @param timeout how long to wait before completing normally
* with the given value, in units of {@code unit}
* @param unit a {@code TimeUnit} determining how to interpret the
* {@code timeout} parameter
* @return this CompletableFuture
- * @since 1.9
+ * @since 9
*/
public CompletableFuture<T> completeOnTimeout(T value, long timeout,
TimeUnit unit) {
if (unit == null)
throw new NullPointerException();
@@ -2571,11 +2571,11 @@
* @param delay how long to delay, in units of {@code unit}
* @param unit a {@code TimeUnit} determining how to interpret the
* {@code delay} parameter
* @param executor the base executor
* @return the new delayed executor
- * @since 1.9
+ * @since 9
*/
public static Executor delayedExecutor(long delay, TimeUnit unit,
Executor executor) {
if (unit == null || executor == null)
throw new NullPointerException();
@@ -2590,11 +2590,11 @@
*
* @param delay how long to delay, in units of {@code unit}
* @param unit a {@code TimeUnit} determining how to interpret the
* {@code delay} parameter
* @return the new delayed executor
- * @since 1.9
+ * @since 9
*/
public static Executor delayedExecutor(long delay, TimeUnit unit) {
if (unit == null)
throw new NullPointerException();
return new DelayedExecutor(delay, unit, ASYNC_POOL);
@@ -2606,11 +2606,11 @@
* interface {@link CompletionStage}.
*
* @param value the value
* @param <U> the type of the value
* @return the completed CompletionStage
- * @since 1.9
+ * @since 9
*/
public static <U> CompletionStage<U> completedStage(U value) {
return new MinimalStage<U>((value == null) ? NIL : value);
}
@@ -2619,11 +2619,11 @@
* exceptionally with the given exception.
*
* @param ex the exception
* @param <U> the type of the value
* @return the exceptionally completed CompletableFuture
- * @since 1.9
+ * @since 9
*/
public static <U> CompletableFuture<U> failedFuture(Throwable ex) {
if (ex == null) throw new NullPointerException();
return new CompletableFuture<U>(new AltResult(ex));
}
@@ -2634,11 +2634,11 @@
* methods in interface {@link CompletionStage}.
*
* @param ex the exception
* @param <U> the type of the value
* @return the exceptionally completed CompletionStage
- * @since 1.9
+ * @since 9
*/
public static <U> CompletionStage<U> failedStage(Throwable ex) {
if (ex == null) throw new NullPointerException();
return new MinimalStage<U>(new AltResult(ex));
}
< prev index next >