Skip to content

Type Interfaces : HotStream

johnmcclean-aol edited this page Nov 23, 2016 · 2 revisions

The HotStream interface

The HotStream interface represents a Stream that is actively emitting values.

HotStream contains the following methods

  • connect() : this will open a connection backed by a OneToOneConcurrentArrayQueue with a max of 256 elements.
  • connect(java.util.Queue) : this allows users to create a connection backed by their Queue of choice
  • connectTo(java.util.Queue queue, java.util.function.Function<ReactiveSeq,R> to) : Allows users to connect to the HotStream converting the connected ReactiveSeq to their Stream of choice.

Example

 ReactiveSeq.range(1,1_000_000_000)
            .hotStream(exec)
            .connect()
            .forEach(System.out::println)

Used in

ReactiveSeq, LazyFutureStream

## Subtypes

PausableHotStream, NonPausabelHotStream

Clone this wiki locally