예제 #1
0
 /// <summary>
 /// Windows this <see cref="DataStream{TElement}"/> into sliding count windows.
 /// Note: This operation is inherently non-parallel since all elements have to pass through the same operator instance.
 /// </summary>
 /// <param name="size">The size of the windows in number of elements.</param>
 /// <param name="slide">The slide interval in number of elements.</param>
 /// <returns></returns>
 public AllWindowedStream <TElement, GlobalWindow> CountWindowAll(long size, long slide) =>
 WindowAll(GlobalWindowAssigner <TElement> .Create())
 .Evictor(CountWindowEvictor.Of <TElement, GlobalWindow>(size))
 .Trigger(CountWindowTrigger.Of <TElement, GlobalWindow>(slide));
예제 #2
0
 /// <summary>
 /// Windows this <see cref="DataStream{TElement}"/> into tumbling count windows.
 /// Note: This operation is inherently non-parallel since all elements have to pass through the same operator instance.
 /// </summary>
 /// <param name="size">The size of the windows in number of elements.</param>
 /// <returns></returns>
 public AllWindowedStream <TElement, GlobalWindow> CountWindowAll(long size) =>
 WindowAll(GlobalWindowAssigner <TElement> .Create())
 .Trigger(PurgingWindowTrigger.Of(CountWindowTrigger.Of <TElement, GlobalWindow>(size)));