T - The type of values that the stream contains.public final class StreamSpec<T> extends ComposableSpec<StreamSpec<T>,Stream<T>>
Stream. each(java.lang.Iterable<T>) must be called to
provide the stream with its values.| Constructor and Description |
|---|
StreamSpec() |
| Modifier and Type | Method and Description |
|---|---|
StreamSpec<T> |
batchSize(int batchSize)
Configures the stream to have the given
batchSize. |
protected Stream<T> |
createComposable(Environment env,
Observable observable,
Tuple2<Selector,java.lang.Object> accept) |
StreamSpec<T> |
each(java.lang.Iterable<T> values)
Configures the stream to contain the given
values. |
StreamSpec<T> |
generate(Supplier<T> supplier)
Configures the stream to pass value from a
Supplier on flush. |
configureactorSystem, actorSystem, defaultDispatcher, dispatcher, dispatcher, env, get, synchronousDispatcherpublic StreamSpec<T> batchSize(int batchSize)
batchSize. A value of -1, which
is the default configuration, configures the stream to not be batched.batchSize - The batch size of the streamthispublic StreamSpec<T> each(java.lang.Iterable<T> values)
values.values - The stream's valuesthispublic StreamSpec<T> generate(Supplier<T> supplier)
Supplier on flush.supplier - The stream's value generatorthisprotected Stream<T> createComposable(Environment env, Observable observable, Tuple2<Selector,java.lang.Object> accept)
createComposable in class ComposableSpec<StreamSpec<T>,Stream<T>>