LimitPolicy

Constructor

Visual Basic

Public Sub New(
    ByVal limitPolicyStrategy As LimitPolicyStrategy,
    ByVal maxEvents As UInt32,
    ByVal discardAmount As UInt32 )

C#

public LimitPolicy(
    LimitPolicyStrategy limitPolicyStrategy,
    uint maxEvents,
    uint discardAmount );

Purpose

Create a limit policy.

Parameter

Description

limitPolicyStrategy

Each queue has a policy strategy for discarding events when a new event would cause the queue to exceed its MaxEvents limit.

When maxEvents is zero (unlimited), the strategy must be LimitPolicyStrategy.DiscardNone.

maxEvents

Programs can limit the number of events that a queue can hold—either to curb queue growth, or implement a specialized dispatch semantics.

Zero specifies an unlimited number of events; in this case, the strategy must be LimitPolicyStrategy.DiscardNone.

discardAmount

When the queue exceeds its maximum event limit, discard a block of events. This argument specifies the number of events to discard.

When discardAmount is zero, the strategy must be LimitPolicyStrategy.DiscardNone.