Skip to content

Type Interfaces : PausableHotStream

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

The PausableHotStream interface

The PausableHotStream interface represents a HotStream that is pausable.

PausableHotStream contains the following methods

  • pause - pause this HotStream
  • unpause - unpause this HotStream

Example

PausableHotStream<Integer> s = ReactiveSeq.range(0,Integer.MAX_VALUE)
				          .primedPausableHotStream(exec);

s.connect()
 .forEachX(5,System.out::println);

s.pause();

s.connect()
 .forEachX(5000,System.out::println);

//different thread

s.unpause();

Used in

ReactiveSeq, LazyFutureStream

Clone this wiki locally