AdvanceTimeGenerationSettings Constructor (TimeSpan, TimeSpan, Boolean)

Initializes a new instance of the AdvanceTimeSettings class with the specified frequency, delay and advance to infinity setting .

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

Syntax

public AdvanceTimeGenerationSettings(
    TimeSpan duration,
    TimeSpan delay,
    bool advanceToInfinityOnShutdown
)

Parameters

  • duration
    Type: System.TimeSpan
    Defines the application time span that must elapse since the last Current Time Increment (CTI) in terms of input event timestamps before the engine advances time again by generating a new CTI event.
  • delay
    Type: System.TimeSpan
    Defines the timestamp of the generated CTIs as a delay of time T with respect to the last received event. A positive value implements a grace period to allow for out-of-order events. Smaller values reduce latency. Larger values increase the window in which out-of-order events can be received.
  • advanceToInfinityOnShutdown
    Type: System.Boolean
    Controls whether a final CTI with a time stamp of positive infinity should be inserted when the query is shut down. This is used to flush all remaining events from the query's operators.

Remarks

CTIs are used to commit sequences of events and release computed results to the query output by asserting to the StreamInsight server that certain parts of the timeline will not change any more. Hence, it is crucial to enqueue CTIs along with events into the input event stream in order to produce any result and to flush the state of stateful operators. For more information, see Advancing Application Time.

Examples

var atgs = new AdvanceTimeGenerationSettings(TimeSpan.FromSeconds(30),TimeSpan.FromSeconds(5) true);

This example instantiates an AdvanceTimeGenerationSettings object, that - when used in a query binding or adapter factory - instructs the engine to insert a CTI as soon as an event has been received whose time stamp is 30 seconds or more ahead of the previous CTI. The CTI carries a time stamp of the last event's time minus 5 seconds. This delay mechanism effectively implements a grace period so that the event source can enqueue late events without violating CTI semantics (as long as the events are never more than 5 seconds late). When the corresponding query is shut down, a CTI with infinite time will be enqueued. For more information, see Advancing Application Time.

See Also

Reference

AdvanceTimeGenerationSettings Class

AdvanceTimeGenerationSettings Overload

Microsoft.ComplexEventProcessing Namespace