CepStream.HoppingWindow<TPayload> Method (CepStream<TPayload>, TimeSpan, TimeSpan, HoppingWindowOutputPolicy)

Transforms a stream to a window stream where each member is a CepWindow. The window is defined by the constant window size and hop size timespans.

Namespace:  Microsoft.ComplexEventProcessing.Linq
Assembly:  Microsoft.ComplexEventProcessing (in Microsoft.ComplexEventProcessing.dll)

Syntax

public static CepWindowStream<CepWindow<TPayload>> HoppingWindow<TPayload>(
    this CepStream<TPayload> source,
    TimeSpan windowSize,
    TimeSpan hopSize,
    HoppingWindowOutputPolicy outputPolicy
)

Type Parameters

  • TPayload
    The type of the input event payload.

Parameters

Return Value

Type: Microsoft.ComplexEventProcessing.Linq.CepWindowStream<CepWindow<TPayload>>
A window stream to which aggregates, ranking, or user-defined operations can be applied to.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type CepStream<TPayload>. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=sql.105) or https://msdn.microsoft.com/en-us/library/bb383977(v=sql.105).

Remarks

Uses a default input policy that clips both start and end times of the events to the window size. For more information, see Using Event Windows.

Examples

var hoppingAgg = from w in inputStream.HoppingWindow(TimeSpan.FromHours(1),
                                                     TimeSpan.FromMinutes(10),
                                                     WindowOutputPolicy.ClipToWindowEnd)
                 select new { sum = w.Sum(e => e.i) };

See Also

Reference

CepStream Class

HoppingWindow Overload

Microsoft.ComplexEventProcessing.Linq Namespace