public interface LazyReactive
Modifier and Type | Method and Description |
---|---|
default <T> LazyFutureStream<T> |
async(java.util.function.Function<LazyReact,LazyFutureStream<T>> react)
Generate a multi-threaded LazyFutureStream that executes all tasks via
a task executor between each stage (unless sync operator invoked).
|
default OptimizedLazyReact |
cpuStream() |
default <K,V> java.util.Optional<Adapter<V>> |
enqueue(K key,
V value)
Add a value to an simple-react Async.Adapter (Queue / Topic /Signal) if present
Returns the Adapter wrapped in an Optional
|
default OptimizedLazyReact |
ioStream() |
default <T> void |
run(LazyFutureStream<T> stream)
Convenience method that runs a LazyFutureStream without blocking the current thread
|
default <T> LazyFutureStream<T> |
switchToCPU(LazyFutureStream<T> stream)
Switch LazyFutureStream into execution mode suitable for CPU bound execution (reuse cpuReactors task executor)
|
default <T> LazyFutureStream<T> |
switchToIO(LazyFutureStream<T> stream)
Switch LazyFutureStream into execution mode suitable for IO (reuse ioReactors task executor)
|
default <T> LazyFutureStream<T> |
sync(java.util.function.Function<LazyReact,LazyFutureStream<T>> react)
Generate a sequentially executing single-threaded a LazyFutureStream that executes all tasks directly without involving
a task executor between each stage (unless async operator invoked).
|
default <K,V> java.util.Optional<Adapter<V>> enqueue(K key, V value)
key
- : identifier for registered Queuevalue
- : value to add to QueuePipes.register(Object, com.aol.simple.react.async.Adapter)
default <T> LazyFutureStream<T> sync(java.util.function.Function<LazyReact,LazyFutureStream<T>> react)
react
- Function that generates a LazyFutureStream from a LazyReact builderrun(com.aol.simple.react.stream.traits.LazyFutureStream)
default <T> LazyFutureStream<T> switchToIO(LazyFutureStream<T> stream)
stream
- to convert to IO modedefault <T> LazyFutureStream<T> switchToCPU(LazyFutureStream<T> stream)
stream
- to convert to CPU bound modedefault OptimizedLazyReact ioStream()
default OptimizedLazyReact cpuStream()
default <T> LazyFutureStream<T> async(java.util.function.Function<LazyReact,LazyFutureStream<T>> react)
react
- Function that generates a LazyFutureStream from a LazyReact builderrun(com.aol.simple.react.stream.traits.LazyFutureStream)
default <T> void run(LazyFutureStream<T> stream)
stream
- to execute