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 继承。)
公共方法 GetHashCode (从 Object 继承。)
公共方法 GetType (从 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) 成员都是线程安全的。不保证所有实例成员都是线程安全的。

请参阅

参考

Microsoft.SqlServer.Management.Smo 命名空间