Class BufferUntilSubscriber<T>

java.lang.Object
rx.Observable<T>
rx.subjects.Subject<T,T>
rx.internal.operators.BufferUntilSubscriber<T>
Type Parameters:
T - the type of the items to be buffered
All Implemented Interfaces:
Observer<T>

public final class BufferUntilSubscriber<T> extends Subject<T,T>
A solution to the "time gap" problem that occurs with groupBy and pivot.

This currently has temporary unbounded buffers. It needs to become bounded and then do one of two things:

  1. blow up and make the user do something about it
  2. work with the backpressure solution ... still to be implemented (such as co-routines)

Generally the buffer should be very short lived (milliseconds) and then stops being involved. It can become a memory leak though if a GroupedObservable backed by this class is emitted but never subscribed to (such as filtered out). In that case, either a time-bomb to throw away the buffer, or just blowing up and making the user do something about it is needed.

For example, to filter out GroupedObservables, perhaps they need a silent subscribe() on them to just blackhole the data.

This is an initial start at solving this problem and solves the immediate problem of groupBy and pivot and trades off the possibility of memory leak for deterministic functionality.

See Also: