| Modifier and Type | Method and Description |
|---|---|
| public PushStream | Returns: Builder style (can be a new or the same object)Changes the back-pressure propagated by this pipeline stage. |
| public PushStream | Returns: Builder style (can be a new or the same object)Changes the back-pressure propagated by this pipeline stage. |
| public Promise | |
| public Promise | |
| public <R> PushStream | |
| public PushStream | Returns: Builder style (can be a new or the same object)Buffer the events in a queue using default values for the queue size and other behaviors. |
| public <U extends BlockingQueue | Returns: A builder which can be used to configure the buffer for this pipeline stage.Build a buffer to enqueue events in a queue using custom values for the queue size and other behaviors. |
| public void | close()
Redeclares java. Close this PushStream by sending an event of type
|
| public <R> PushStream | |
| public <R> PushStream | Returns: Builder style (can be a new or the same object)Coalesces a number of events into a new type of event. |
| public <R> PushStream | Returns: Builder style (can be a new or the same object)Coalesces a number of events into a new type of event. |
| public <R, A> Promise | |
| public Promise | |
| public PushStream | |
| public PushStream | |
| public Promise | |
| public Promise | |
| public <R> PushStream | Returns: Builder style (can be a new or the same object)The flat map function mapper)Flat map the payload value (turn one event into 0..n events of potentially another type). |
| public Promise | |
| public Promise | Returns: a promisePass on each event to another consumer until the stream is closed. |
| public PushStream | |
| public PushStream | Returns: Builder style (can be a new or the same object)Maximum number of elements has been received maxSize)Automatically close the channel after the maxSize number of elements is received. |
| public PushStream | |
| public <R> PushStream | |
| public Promise | Returns: A Promise representing the maximum value, or null if no values are seen before the end of the streamSee Stream. |
| public PushStream | Returns: Builder style (can be a new or the same object)The source to merge in. source)Merge in the events from another source. |
| public PushStream | Returns: Builder style (can be a new or the same object)The source to merge in. source)Merge in the events from another PushStream. |
| public Promise | Returns: A Promise representing the minimum value, or null if no values are seen before the end of the streamSee Stream. |
| public Promise | |
| public PushStream | |
| public PushStream | Returns: This streamWill be called on an error event errorHandler)Provide a handler that will be called if the PushStream is closed with an
event of type |
| public Promise | Returns: AThe identity/begin value identity, BinaryOperator<T> The accumulator accumulator)Standard reduce, see Stream. |
| public Promise | Returns: an OptionalThe accumulator accumulator)Standard reduce without identity, so the return is an Optional. |
| public <U> Promise | Returns: The promisecombines two U's into one U (for example, combine two
lists) combiner)Standard reduce with identity, accumulator and combiner. |
| public PushStream | Returns: Builder style (can be a new or the same object)Ensure that any events are delivered sequentially. |
| public PushStream | Returns: Builder style (can be a new or the same object)number of elements to skip n)Skip a number of events in the channel. |
| public PushStream | Returns: Builder style (can be a new or the same object)Sorted the elements, assuming that T extends Comparable. |
| public PushStream | Returns: Builder style (can be a new or the same object)Sorted the elements with the given comparator. |
| public PushStream | |
| public PushStream | |
| public Promise | Returns: A promise that is resolved with all the payloads received over the channelCollect the payloads in an Object array after the channel is closed. |
| public < The element type of the resulting array. A> Promise | Returns: A promise that is resolved with all the payloads received over the channel. The promise will be failed with an ArrayStoreException if the runtime type of the array returned by the array generator is not a supertype of the runtime type of every payload in the channel.A function which returns an array into which the
payloads are stored. generator)Collect the payloads in an Object array after the channel is closed. |
| public <R> PushStream | Returns: Builder style (can be a new or the same object)Buffers a number of events over a fixed time interval and then forwards the events to an accumulator function. |
| public <R> PushStream | Returns: Builder style (can be a new or the same object)Buffers a number of events over a fixed time interval and then forwards the events to an accumulator function. |
| public <R> PushStream | Returns: Builder style (can be a new or the same object)Buffers a number of events over a variable time interval and then forwards the events to an accumulator function. |
| public <R> PushStream | Returns: Builder style (can be a new or the same object)Buffers a number of events over a variable time interval and then forwards the events to an accumulator function. |
| adjustBackPressure | back to summary |
|---|---|
| public PushStream Changes the back-pressure propagated by this pipeline stage. The supplied function receives the back pressure returned by the next pipeline stage and returns the back pressure that should be returned by this stage. This function will not be called if the previous pipeline stage returns negative back pressure.
| |
| adjustBackPressure | back to summary |
|---|---|
| public PushStream Changes the back-pressure propagated by this pipeline stage. The supplied function receives the data object passed to the next pipeline stage and the back pressure that was returned by that stage when accepting it. The function returns the back pressure that should be returned by this stage. This function will not be called if the previous pipeline stage returns negative back pressure.
| |
| allMatch | back to summary |
|---|---|
| public Promise Closes the channel and resolve the promise with false when the predicate does not matches a pay load. If the channel is closed before, the promise is resolved with true. This is a short circuiting terminal operation | |
| anyMatch | back to summary |
|---|---|
| public Promise Close the channel and resolve the promise with true when the predicate matches a payload. If the channel is closed before the predicate matches, the promise is resolved with false. This is a short circuiting terminal operation | |
| asyncMap | back to summary |
|---|---|
| public <R> PushStream Asynchronously map the payload values. The mapping function returns a Promise representing the asynchronous mapping operation. The PushStream limits the number of concurrently running mapping operations, and returns back pressure based on the number of existing queued operations.
| |
| buffer | back to summary |
|---|---|
| public PushStream Buffer the events in a queue using default values for the queue size and other behaviors. Buffered work will be processed asynchronously in the rest of the chain. Buffering also blocks the transmission of back pressure to previous elements in the chain, although back pressure is honored by the buffer.
Buffers are useful for "bursty" event sources which produce a number of
events close together, then none for some time. These bursts can
sometimes overwhelm downstream event consumers. Buffering will not,
however, protect downstream components from a source which produces
events faster than they can be consumed. For fast sources
| |
| buildBuffer | back to summary |
|---|---|
| public <U extends BlockingQueue Build a buffer to enqueue events in a queue using custom values for the queue size and other behaviors. Buffered work will be processed asynchronously in the rest of the chain. Buffering also blocks the transmission of back pressure to previous elements in the chain, although back pressure is honored by the buffer.
Buffers are useful for "bursty" event sources which produce a number of
events close together, then none for some time. These bursts can
sometimes overwhelm downstream event consumers. Buffering will not,
however, protect downstream components from a source which produces
events faster than they can be consumed. For fast sources
Buffers are also useful as "circuit breakers" in the pipeline. If a
| |
| close | back to summary |
|---|---|
| public void close() Redeclares java. Close this PushStream by sending an event of type
Calling
| |
| coalesce | back to summary |
|---|---|
| public <R> PushStream Coalesces a number of events into a new type of event. The input events are forwarded to a accumulator function. This function returns an Optional. If the optional is present, it's value is send downstream, otherwise it is ignored.
| |
| coalesce | back to summary |
|---|---|
| public <R> PushStream Coalesces a number of events into a new type of event. A fixed number of input events are forwarded to a accumulator function. This function returns new event data to be forwarded on.
| |
| coalesce | back to summary |
|---|---|
| public <R> PushStream Coalesces a number of events into a new type of event. A variable number of input events are forwarded to a accumulator function. The number of events to be forwarded is determined by calling the count function. The accumulator function then returns new event data to be forwarded on.
| |
| collect | back to summary |
|---|---|
| public <R, A> Promise See Stream. Will resolve once the channel closes. This is a terminal operation
| |
| count | back to summary |
|---|---|
| public Promise See Stream. Will resolve onces the channel closes. This is a terminal operation | |
| distinct | back to summary |
|---|---|
| public PushStream Remove any duplicates. Notice that this can be expensive in a large stream since it must track previous payloads.
| |
| filter | back to summary |
|---|---|
| public PushStream Only pass events downstream when the predicate tests true.
| |
| findAny | back to summary |
|---|---|
| public Promise Close the channel and resolve the promise with the first element. If the channel is closed before, the Optional will have no value. This is a terminal operation | |
| findFirst | back to summary |
|---|---|
| public Promise Close the channel and resolve the promise with the first element. If the channel is closed before, the Optional will have no value. | |
| flatMap | back to summary |
|---|---|
| public <R> PushStream Flat map the payload value (turn one event into 0..n events of potentially another type).
| |
| forEach | back to summary |
|---|---|
| public Promise Execute the action for each event received until the channel is closed. This is a terminating method, the returned promise is resolved when the channel closes. This is a terminal operation | |
| forEachEvent | back to summary |
|---|---|
| public Promise Pass on each event to another consumer until the stream is closed. This is a terminal operation | |
| fork | back to summary |
|---|---|
| public PushStream Execute the downstream events in up to n background threads. If more requests are outstanding apply delay * nr of delayed threads back pressure. A downstream channel that is closed or throws an exception will cause all execution to cease and the stream to close
| |
| limit | back to summary |
|---|---|
| public PushStream Automatically close the channel after the maxSize number of elements is received.
| |
| limit | back to summary |
|---|---|
| public PushStream Automatically close the channel after the given amount of time has elapsed.
| |
| map | back to summary |
|---|---|
| public <R> PushStream Map a payload value.
| |
| max | back to summary |
|---|---|
| public Promise See Stream. Will resolve onces the channel closes. This is a terminal operation | |
| merge | back to summary |
|---|---|
| public PushStream Merge in the events from another source. The resulting channel is not closed until this channel and the channel from the source are closed.
| |
| merge | back to summary |
|---|---|
| public PushStream Merge in the events from another PushStream. The resulting channel is not closed until this channel and the channel from the source are closed.
| |
| min | back to summary |
|---|---|
| public Promise See Stream. Will resolve onces the channel closes. This is a terminal operation | |
| noneMatch | back to summary |
|---|---|
| public Promise Closes the channel and resolve the promise with false when the predicate matches any pay load. If the channel is closed before, the promise is resolved with true. This is a short circuiting terminal operation | |
| onClose | back to summary |
|---|---|
| public PushStream Provide a handler that must be run after the PushStream is closed. This handler will run after any downstream operations have processed the terminal event but before any upstream operations have processed the terminal event.
| |
| onError | back to summary |
|---|---|
| public PushStream Provide a handler that will be called if the PushStream is closed with an
event of type
| |
| reduce | back to summary |
|---|---|
| public Promise Standard reduce, see Stream. The returned promise will be resolved when the channel closes. This is a terminal operation
| |
| reduce | back to summary |
|---|---|
| public Promise Standard reduce without identity, so the return is an Optional. The returned promise will be resolved when the channel closes. This is a terminal operation
| |
| reduce | back to summary |
|---|---|
| public <U> Promise Standard reduce with identity, accumulator and combiner. The returned promise will be resolved when the channel closes. This is a terminal operation
| |
| sequential | back to summary |
|---|---|
| public PushStream Ensure that any events are delivered sequentially. That is, no overlapping calls downstream. This can be used to turn a forked stream (where for example a heavy conversion is done in multiple threads) back into a sequential stream so a reduce is simple to do.
| |
| skip | back to summary |
|---|---|
| public PushStream Skip a number of events in the channel.
| |
| sorted | back to summary |
|---|---|
| public PushStream Sorted the elements, assuming that T extends Comparable. This is of course expensive for large or infinite streams since it requires buffering the stream until close.
| |
| sorted | back to summary |
|---|---|
| public PushStream Sorted the elements with the given comparator. This is of course expensive for large or infinite streams since it requires buffering the stream until close.
| |
| split | back to summary |
|---|---|
| public PushStream Split the events to different streams based on a predicate. If the predicate is true, the event is dispatched to that channel on the same position. All predicates are tested for every event. This method differs from other methods of PushStream in three significant ways:
| |
| timeout | back to summary |
|---|---|
| public PushStream Automatically fail the channel if no events are received for the
indicated length of time. If the timeout is reached then a failure event
containing a
| |
| toArray | back to summary |
|---|---|
| public Promise Collect the payloads in an Object array after the channel is closed. This is a terminating method, the returned promise is resolved when the channel is closed. This is a terminal operation | |
| toArray | back to summary |
|---|---|
| public <A> Promise Collect the payloads in an Object array after the channel is closed. This is a terminating method, the returned promise is resolved when the channel is closed. The type of the array is handled by the caller using a generator function that gets the length of the desired array. This is a terminal operation
| |
| window | back to summary |
|---|---|
| public <R> PushStream Buffers a number of events over a fixed time interval and then forwards the events to an accumulator function. This function returns new event data to be forwarded on. Note that:
| |
| window | back to summary |
|---|---|
| public <R> PushStream Buffers a number of events over a fixed time interval and then forwards the events to an accumulator function. This function returns new event data to be forwarded on. Note that:
| |
| window | back to summary |
|---|---|
| public <R> PushStream Buffers a number of events over a variable time interval and then forwards the events to an accumulator function. The length of time over which events are buffered is determined by the time function. A maximum number of events can also be requested, if this number of events is reached then the accumulator will be called early. The accumulator function returns new event data to be forwarded on. It is also given the length of time for which the buffer accumulated data. This may be less than the requested interval if the buffer reached the maximum number of requested events early. Note that:
| |
| window | back to summary |
|---|---|
| public <R> PushStream Buffers a number of events over a variable time interval and then forwards the events to an accumulator function. The length of time over which events are buffered is determined by the time function. A maximum number of events can also be requested, if this number of events is reached then the accumulator will be called early. The accumulator function returns new event data to be forwarded on. It is also given the length of time for which the buffer accumulated data. This may be less than the requested interval if the buffer reached the maximum number of requested events early. Note that:
| |