Share via


AdvanceTimeGenerationSettings Constructor (UInt32, TimeSpan, Boolean)

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

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

Syntax

public AdvanceTimeGenerationSettings(
    uint eventCount,
    TimeSpan delay,
    bool advanceToInfinityOnShutdown
)

Parameters

  • eventCount
    Type: System.UInt32
    Defines the number of events that must be received from the event source before the engine advances time again by generating a Current Time Increment (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. 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.

Examples

var atgs = new AdvanceTimeGenerationSettings(10, 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 after every 10 events that come from the event source. The CTI carries a time stamp of the last event's time stamp 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