healthMonitoring 的 bufferMode 的 add 元素(ASP.NET 设置架构)

[本文档仅供预览,在以后的发行版中可能会发生更改。包含的空白主题用作占位符。]

配置缓冲区模式并将其添加到 HealthBufferModeSettings 集合中。

此元素是 .NET Framework 2.0 版中的新元素。

<add 
  name="buffer mode name"
  maxBufferSize="buffer size"
  maxFlushSize="maximum events per flush"
  urgentFlushThreshold="minimum threshold per flush"
  regularFlushInterval="time interval per flush"
  urgentFlushInterval="minimum time between flushes"
  maxBufferThreads="maximum number of flushing threads"
/> 

特性和元素

下面几部分描述了本节涉及的特性、子元素和父元素。

特性

特性

说明

name

必选的 String 特性。

指定此缓冲区模式的名称。

maxBufferSize

必选的 Int32 特性。

指定可以缓冲的最大事件数。

该值不能为 0。

maxFlushSize

必选的 Int32 特性。

指定每次刷新的最大事件数。

该值必须介于 1 和 maxBufferSize 之间。

urgentFlushThreshold

必选的 Int32 特性。

指定每次刷新的最小阈值。

该值必须小于或等于 maxBufferSize。

regularFlushInterval

必选的 TimeSpan 特性。

指定每次刷新的时间间隔。

该值不能为 0。

urgentFlushInterval

必选的 TimeSpan 特性。

指定两次刷新之间的最短时间。

该值必须介于 0 和 regularFlushInterval 之间。

maxBufferThreads

必选的 Int32 特性。

指定刷新线程的最大数目。

子元素

无。

父元素

元素

说明

configuration

指定公共语言运行时和 .NET Framework 应用程序所使用的每个配置文件中的根元素。

system.web

为 ASP.NET 配置节指定根元素。

healthMonitoring

针对运行状况监视配置应用程序。

bufferModes

定义提供程序的缓存功能。

备注

默认配置

下面的默认 add 元素在 .NET Framework 版本 2.0 的根 Web.config 文件中配置。

<add name="Critical Notification" maxBufferSize="100" maxFlushSize="20"
     urgentFlushThreshold="1" regularFlushInterval="Infinite" urgentFlushInterval="00:01:00" 
     maxBufferThreads="1" />
<add name="Notification" maxBufferSize="300" maxFlushSize="20"
     urgentFlushThreshold="1" regularFlushInterval="Infinite" urgentFlushInterval="00:01:00" 
     maxBufferThreads="1" />
<add name="Analysis" maxBufferSize="1000" maxFlushSize="100" urgentFlushThreshold="100" 
     regularFlushInterval="00:05:00" urgentFlushInterval="00:01:00" 
     maxBufferThreads="1" />
<add name="Logging" maxBufferSize="1000" maxFlushSize="200" 
     urgentFlushThreshold="800" regularFlushInterval="00:30:00" urgentFlushInterval="00:05:00" 
     maxBufferThreads="1" />

示例

下面的代码示例演示如何添加缓冲区模式。

<bufferModes>
  <add name="Critical Notification"
    maxBufferSize="100"
    maxFlushSize="20"
    urgentFlushThreshold="1"
    regularFlushInterval="Infinite"
    urgentFlushInterval="00:01:00"
    maxBufferThreads="1"
  />
</bufferModes>

元素信息

配置节处理程序

System.Web.Configuration.HealthMonitoringSection

配置成员

System.Web.Configuration.BufferModesCollection

可配置的位置

Machine.config

根级别的 Web.config

应用程序级别的 Web.config

要求

Microsoft Internet 信息服务 (IIS) 版本 5.0、5.1 或 6.0

.NET Framework 2.0 版

Microsoft Visual Studio 2005

请参见

任务

How to: Lock ASP.NET Configuration Settings

参考

healthMonitoring 元素(ASP.NET 设置架构)

healthMonitoring 的 bufferModes 元素(ASP.NET 设置架构)

healthMonitoring 的 bufferModes 的 clear 元素(ASP.NET 设置架构)

healthMonitoring 的 bufferModes 的 remove 元素(ASP.NET 设置架构)

System.Configuration

System.Web.Configuration

概念

ASP.NET Configuration Overview

ASP.NET Server Controls and Browser Capabilities

Securing Configuration

Configuration Inheritance

其他资源

ASP.NET Configuration Files

ASP.NET 配置设置

常规配置设置 (ASP.NET)

ASP.NET Configuration API