Class CompletionStages
- java.lang.Object
-
- org.opendaylight.infrautils.utils.concurrent.CompletionStages
-
public final class CompletionStages extends Object
Utilities forCompletionStage
.- Author:
- Michael Vorburger.ch
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> CompletionStage<T>
completedExceptionally(Throwable throwable)
Return an immediately exceptional completed CompletionStage.static <V> com.google.common.util.concurrent.ListenableFuture<V>
toListenableFuture(CompletionStage<V> completionStage)
Converts a Java 8 CompletionStage to a Guava ListenableFuture.
-
-
-
Method Detail
-
toListenableFuture
public static <V> com.google.common.util.concurrent.ListenableFuture<V> toListenableFuture(CompletionStage<V> completionStage)
Converts a Java 8 CompletionStage to a Guava ListenableFuture. SeeListenableFutures.toCompletionStage(ListenableFuture)
for the exact inverse function of this, andCompletableFutures.toListenableFuture(java.util.concurrent.CompletableFuture)
for a related function.
-
completedExceptionally
public static <T> CompletionStage<T> completedExceptionally(Throwable throwable)
Return an immediately exceptional completed CompletionStage. SeeCompletableFutures.completedExceptionally(Throwable)
.
-
-