public override IDisposable Subscribe(IStreamObserver <TOuterKey, TResult> observer) { if (Properties.IsColumnar && CanGenerateColumnar()) { return(Source.Subscribe(GetPipe(observer))); } else { return(Source.Subscribe(CreatePipe(observer))); } }
public override IDisposable Subscribe(IStreamObserver <CompoundGroupKey <TOuterKey, TInnerKey>, TSource> observer) { var pipe = Properties.IsColumnar ? GetPipe(observer) : CreatePipe(observer); return(Source.Subscribe(pipe)); }
public override IDisposable Subscribe(IStreamObserver <CompoundGroupKey <TOuterKey, TInnerKey>, TSource> observer) { if (totalBranchesL2 <= 1) { return(singleThreadedShuffler.Subscribe(observer)); } numBranches++; if (pipe == null) { if (this.Properties.IsColumnar && CanGenerateColumnar()) { pipe = GetPipe(observer, totalBranchesL2, shuffleId); } else { pipe = CreatePipe(observer); } } var o = observer; pipe.AddObserver(o); var d = o as IDisposable; if (numBranches < totalBranchesL2) { return(d ?? Utility.EmptyDisposable); } else { // Reset status for next set of subscribe calls var oldpipe = pipe; pipe = null; numBranches = 0; if (d == null) { return(Source.Subscribe(oldpipe)); } else { return(Utility.CreateDisposable(Source.Subscribe(oldpipe), d)); } } }
public override IDisposable Subscribe(IStreamObserver <CompoundGroupKey <TOuterKey, TInnerKey>, TSource> observer) { IStreamObserver <TOuterKey, TSource> pipe = null; if (Properties.IsColumnar) { pipe = GetPipe(observer); } else { pipe = CreatePipe(observer); } return(Source.Subscribe(pipe)); }
/// <summary> /// /// </summary> /// <returns></returns> public IDisposable Connect() { return(Source.Subscribe(Config.StreamScheduler.RegisterStreamObserver(this))); }