Left - the element type of the left streamRight - the element type of the right streamLeftDuration - the overlapping duration indicator for the left stream (e.g., the event when it leaves)RightDuration - the overlapping duration indicator for the right stream (e.g., the event when it leaves)Result - the type of the grouping based on the coincidence.public class GroupJoin<Result,Left,Right,LeftDuration,RightDuration> extends Producer<Result>
Windows are terminated by either a next() or finish call from the duration observables.
Producer.State<U>| Modifier and Type | Field and Description |
|---|---|
protected Observable<? extends Left> |
left |
protected Func1<? super Left,? extends Observable<LeftDuration>> |
leftDurationSelector |
protected Func2<? super Left,? super Observable<? extends Right>,? extends Result> |
resultSelector |
protected Observable<? extends Right> |
right |
protected Func1<? super Right,? extends Observable<RightDuration>> |
rightDurationSelector |
| Constructor and Description |
|---|
GroupJoin(Observable<? extends Left> left,
Observable<? extends Right> right,
Func1<? super Left,? extends Observable<LeftDuration>> leftDurationSelector,
Func1<? super Right,? extends Observable<RightDuration>> rightDurationSelector,
Func2<? super Left,? super Observable<? extends Right>,? extends Result> resultSelector)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.io.Closeable |
run(Observer<? super Result> observer,
java.io.Closeable cancel,
Action1<java.io.Closeable> setSink)
The core implementation of the operator, called upon
registration to the producer.
|
register, registerRawprotected final Func1<? super Right,? extends Observable<RightDuration>> rightDurationSelector
protected final Func1<? super Left,? extends Observable<LeftDuration>> leftDurationSelector
protected final Observable<? extends Left> left
protected final Observable<? extends Right> right
protected final Func2<? super Left,? super Observable<? extends Right>,? extends Result> resultSelector
public GroupJoin(Observable<? extends Left> left, Observable<? extends Right> right, Func1<? super Left,? extends Observable<LeftDuration>> leftDurationSelector, Func1<? super Right,? extends Observable<RightDuration>> rightDurationSelector, Func2<? super Left,? super Observable<? extends Right>,? extends Result> resultSelector)
left - the left source of elementsright - the right source of elementsleftDurationSelector - the duration selector for a left elementrightDurationSelector - the duration selector for a right elementresultSelector - the selector which will produce the output valueprotected java.io.Closeable run(Observer<? super Result> observer, java.io.Closeable cancel, Action1<java.io.Closeable> setSink)
ProducerNote that the observer is not automatically detached in case of error or finish cases. Implementations should ensure proper termination.
run in class Producer<Result>observer - the observer to send notifications oncancel - the cancellation handler from the run() call, allows self cancellationssetSink - communicates the sink to the registering party which allows consumers
to tunnel close calls into the sink, which can stop processing