Share via


Distributor.ThreadPoolSize Property

Gets or sets the maximum number of threads that the distributor can use to process work items.

Espace de noms: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Syntaxe

'Déclaration
Public Property ThreadPoolSize As Integer
public int ThreadPoolSize { get; set; }
public:
property int ThreadPoolSize {
    int get ();
    void set (int value);
}
/** @property */
public int get_ThreadPoolSize ()

/** @property */
public void set_ThreadPoolSize (int value)
public function get ThreadPoolSize () : int

public function set ThreadPoolSize (value : int)

Valeur de propriété

A Int32 that specifies the maximum number of distributor threads.

Notes

The default distributor thread pool size is 3.

The thread pool size determines the degree to which the distributor can perform work in parallel, and affects the overall performance of the Notification Services system.

The distributor thread pool size can be 1, 2, or 3 in Notification Services Standard Edition. The distributor thread pool value is unlimited in other editions. Note that the value represents a maximum; the actual number of threads depends on the availability of system resources.

For more information about how the distributor settings affect distributor operation, see Spécification des paramètres de distributeur.

Exemple

The following examples show how to create a distributor, define the distributor's properties, and then add it to an application:

// Define distributor for application
Distributor distributor = 
    new Distributor(myApplication, "Distributor");
distributor.SystemName = notificationServicesHost;
distributor.QuantumDuration = new TimeSpan(0, 0, 15);
distributor.ThreadPoolSize = 2;
myApplication.Distributors.Add(distributor);
' Define distributor for application
Dim distributor As Distributor = New Distributor( _
    myApplication, "Distributor")
distributor.SystemName = notificationServicesHost
distributor.QuantumDuration = New TimeSpan(0, 0, 15)
distributor.ThreadPoolSize = 2
myApplication.Distributors.Add(distributor)

Sécurité des threads

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Plateformes

Plateformes de développement

Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.

Plateformes cibles

Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.

Voir aussi

Référence

Distributor Class
Distributor Members
Microsoft.SqlServer.Management.Nmo Namespace

Autres ressources

Spécification des paramètres de distributeur
ThreadPoolSize Element for Distributor (ADF)