public class Futures extends Object
| Constructor and Description | 
|---|
| Futures() | 
| Modifier and Type | Method and Description | 
|---|---|
| <V> V | get(Future<V> future)Waits if necessary for the computation to complete, and then retrieves its result. | 
| CompletableFuture<Void> | toVoidResult(CompletableFuture<?> future)Transforms any  CompletableFutureinto aCompletableFuturewithout result. | 
| com.google.common.util.concurrent.ListenableFuture<Void> | toVoidResult(com.google.common.util.concurrent.ListenableFuture<?> future)Transforms any  ListenableFutureinto aListenableFuturewithout result. | 
public <V> V get(Future<V> future)
CancellationException - if the computation was cancelledcom.google.common.util.concurrent.UncheckedExecutionException - if the computation threw an exceptionUncheckedInterruptedException - if the current thread was interrupted while waiting. The interrupted
     status of the current thread is still set correctly.public com.google.common.util.concurrent.ListenableFuture<Void> toVoidResult(com.google.common.util.concurrent.ListenableFuture<?> future)
ListenableFuture into a ListenableFuture without result. Exceptions that are
 thrown by the original future are handled transparently.future - the future to wrappublic CompletableFuture<Void> toVoidResult(CompletableFuture<?> future)
CompletableFuture into a CompletableFuture without result. Exceptions that are
 thrown by the original future are handled transparently.future - the future to wrapCopyright © 2020. All rights reserved.