NumaNode 類別
The NumaNode object represents the settings for a NUMA node on an instance of SQL Server.
繼承階層
System. . :: . .Object
Microsoft.SqlServer.Management.Smo..::..NumaNode
命名空間: Microsoft.SqlServer.Management.Smo
組件: Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)
語法
'宣告
Public NotInheritable Class NumaNode
'用途
Dim instance As NumaNode
public sealed class NumaNode
public ref class NumaNode sealed
[<SealedAttribute>]
type NumaNode = class end
public final class NumaNode
NumaNode 型別公開下列成員。
屬性
名稱 | 說明 | |
---|---|---|
AffinityMask | Gets or sets the affinity type for the NUMA node represented by this NumaNode object. | |
Cpus | Gets a collection of Cpu objects that belong to this NumaNode object. | |
GroupID | Gets the GroupID that is assigned to this NUMA node. | |
ID | Gets the ID of the NUMA node that is represented by this NumaNode object. |
上層
方法
名稱 | 說明 | |
---|---|---|
Equals | (繼承自 Object。) | |
Finalize | (繼承自 Object。) | |
GetHashCode | (繼承自 Object。) | |
GetType | (繼承自 Object。) | |
MemberwiseClone | (繼承自 Object。) | |
ToString | (繼承自 Object。) |
上層
備註
Access to the NumaNode object is though the AffinityInfo object that is contained in the Server object.
範例
The following example shows how to display all the NUMA nodes on the local instance of SQL Server and the CPUs that belong to each NUMA node.
using System;
using Microsoft.SqlServer.Management.Smo;
namespace samples
{
class Program
{
static void Main(string[] args)
{
Server dbServer = new Server("(local)");
dbServer.Refresh();
foreach (NumaNode node in dbServer.AffinityInfo.NumaNodes)
{
//Display the AffinityMask, GroupID and ID of
//each NUMA node.
Console.WriteLine("AffinityMask: {0}\n" +
"GroupID: {1}\n" +
"ID: {2}\n",
node.AffinityMask.ToString(),
node.GroupID, node.ID);
//Display the ID of each CPU that belongs
//to this NUMA node.
Console.Write("CPUS :");
foreach(Cpu cpu in node.Cpus)
Console.Write("{0} ", cpu.ID);
}
}
}
}
執行緒安全性
這個型別的任何公用 static (在 Visual Basic 中為 Shared) 成員都是執行緒安全的。並不是所有的執行個體成員都保證可以用於所有的執行緒。