Module com.spotify.futures
Package com.spotify.futures
Class CompletableToListenableFutureWrapper<V>
- java.lang.Object
-
- com.google.common.util.concurrent.FluentFuture<V>
-
- com.google.common.util.concurrent.AbstractFuture<V>
-
- com.spotify.futures.CompletableToListenableFutureWrapper<V>
-
- All Implemented Interfaces:
com.google.common.util.concurrent.ListenableFuture<V>,java.util.concurrent.Future<V>,java.util.function.BiConsumer<V,java.lang.Throwable>
class CompletableToListenableFutureWrapper<V> extends com.google.common.util.concurrent.AbstractFuture<V> implements com.google.common.util.concurrent.ListenableFuture<V>, java.util.function.BiConsumer<V,java.lang.Throwable>
-
-
Constructor Summary
Constructors Constructor Description CompletableToListenableFutureWrapper(java.util.concurrent.CompletionStage<V> future)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(V v, java.lang.Throwable throwable)booleancancel(boolean mayInterruptIfRunning)java.util.concurrent.CompletableFuture<V>unwrap()(package private) static java.lang.ThrowableunwrapThrowable(java.lang.Throwable throwable)-
Methods inherited from class com.google.common.util.concurrent.AbstractFuture
addListener, afterDone, get, get, interruptTask, isCancelled, isDone, pendingToString, set, setException, setFuture, toString, wasInterrupted
-
Methods inherited from class com.google.common.util.concurrent.FluentFuture
addCallback, catching, catchingAsync, from, transform, transformAsync, withTimeout
-
-
-
-
Field Detail
-
future
private final java.util.concurrent.CompletionStage<V> future
-
-
Constructor Detail
-
CompletableToListenableFutureWrapper
CompletableToListenableFutureWrapper(java.util.concurrent.CompletionStage<V> future)
-
-
Method Detail
-
unwrap
public java.util.concurrent.CompletableFuture<V> unwrap()
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
accept
public void accept(V v, java.lang.Throwable throwable)
- Specified by:
acceptin interfacejava.util.function.BiConsumer<V,java.lang.Throwable>
-
unwrapThrowable
static java.lang.Throwable unwrapThrowable(java.lang.Throwable throwable)
-
-