public class BufferedStreamAdapter<V> extends Object
Stream of ListenableFutures and provides the results as a new
Stream.bufferSize.Throwable thrown by one of the incoming futures is wrapped in an UncheckedExecutionException and
thrown while supplying the new stream with values.
Stream<ListenableFuture<V>> futureStream;
Stream<V> resultStream = BufferedStreamAdapter.adapt(futureStream, bufferSize, executorService);| Modifier and Type | Method and Description |
|---|---|
static <V> Stream<V> |
adapt(Stream<com.google.common.util.concurrent.ListenableFuture<V>> futures,
int bufferSize,
ExecutorService executorService) |
public static <V> Stream<V> adapt(Stream<com.google.common.util.concurrent.ListenableFuture<V>> futures, int bufferSize, ExecutorService executorService)
Copyright © 2018. All rights reserved.