/// <summary> /// Sets the <see cref="IWindowEvictor{TElement,TWindow}"/> which will be able to remove elements from the window after the trigger fires and before and/or after the function is applied. /// Note: When using an evictor window performance will degrade significantly, since incremental aggregation of window results cannot be used. /// </summary> /// <param name="evictor"></param> /// <returns></returns> public AllWindowedStream <TElement, TWindow> Evictor(IWindowEvictor <TElement, TWindow> evictor) { if (_assigner is BaseAlignedWindowAssigner <TElement> ) { throw new InvalidOperationException("Cannot use a " + _assigner + " with an Evictor."); } _evictor = evictor; return(this); }
private static String GenerateOperatorName <TE, TW>( WindowAssigner <TE, TW> assigner, WindowTrigger <TE, TW> trigger, IWindowEvictor <TE, TW> evictor, IFunction function1, IFunction function2) where TW : Window { return("Window(" + assigner + ", " + trigger.GetType().Name + ", " + (evictor == null ? "" : (evictor.GetType().Name + ", ")) + GenerateFunctionName(function1) + (function2 == null ? "" : (", " + GenerateFunctionName(function2))) + ")"); }
/// <summary> /// Sets the <see cref="IWindowEvictor{TElement,TWindow}"/> that should be used to evict elements from a window before emission. /// Note: When using an evictor window performance will degrade significantly, since incremental aggregation of window results cannot be used. /// </summary> /// <param name="evictor"></param> /// <returns></returns> public WindowedStream <TElement, TKey, TWindow> Evictor(IWindowEvictor <TElement, TWindow> evictor) { return(this); }