T
- Data type of elements in the Streampublic interface HotStream<T>
ReactiveSeq.range(1,1_000_000_000)
.hotStream(exec)
.connect()
.forEach(System.out::println)
Modifier and Type | Method and Description |
---|---|
default ReactiveSeq<T> |
connect()
Connect to this HotStream (Stream that is already emitting data)
|
ReactiveSeq<T> |
connect(java.util.Queue<T> queue)
Connect to this HotStream using the provided transfer async.Queue.
|
default <R extends java.util.stream.Stream<T>> |
connectTo(java.util.Queue<T> queue,
java.util.function.Function<ReactiveSeq<T>,R> to)
Connect to this HotStream using the provided transfer async.Queue.
|
default ReactiveSeq<T> connect()
ReactiveSeq.range(0,Integer.MAX_VALUE)
.limit(100)
.peek(v->value=v)
.peek(v->latch.countDown())
.peek(System.out::println)
.hotStream(exec)
.connect()
.limit(100)
.futureOperations(ForkJoinPool.commonPool())
.forEach(System.out::println)
ReactiveSeq<T> connect(java.util.Queue<T> queue)
WaitStrategy
new LazyReact().range(0,Integer.MAX_VALUE)
.limit(1000)
.peek(v->value=v)
.peek(v->latch.countDown())
.hotStream(exec)
.connect(new LinkedBlockingQueue<>())
.limit(100)
.futureOperations(ForkJoinPool.commonPool())
.forEach(System.out::println)
queue
- Transfer Queue between the Streamsdefault <R extends java.util.stream.Stream<T>> R connectTo(java.util.Queue<T> queue, java.util.function.Function<ReactiveSeq<T>,R> to)
WaitStrategy
Convert the output Stream to the required type with the provided functionqueue
- Transfer Queue between the Streamsto
- Function to convert a ReactiveSeq to desired Stream type