亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? bufferingappenderskeleton.cs

?? 詳細講述了數(shù)據(jù)庫編程
?? CS
?? 第 1 頁 / 共 2 頁
字號:
#region Copyright & License
//
// Copyright 2001-2005 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#endregion

using System;
using System.Collections;

using log4net.Util;
using log4net.Core;

namespace log4net.Appender
{
	/// <summary>
	/// Abstract base class implementation of <see cref="IAppender"/> that 
	/// buffers events in a fixed size buffer.
	/// </summary>
	/// <remarks>
	/// <para>
	/// This base class should be used by appenders that need to buffer a 
	/// number of events before logging them. For example the <see cref="AdoNetAppender"/> 
	/// buffers events and then submits the entire contents of the buffer to 
	/// the underlying database in one go.
	/// </para>
	/// <para>
	/// Subclasses should override the <see cref="SendBuffer(LoggingEvent[])"/>
	/// method to deliver the buffered events.
	/// </para>
	/// <para>The BufferingAppenderSkeleton maintains a fixed size cyclic 
	/// buffer of events. The size of the buffer is set using 
	/// the <see cref="BufferSize"/> property.
	/// </para>
	/// <para>A <see cref="ITriggeringEventEvaluator"/> is used to inspect 
	/// each event as it arrives in the appender. If the <see cref="Evaluator"/> 
	/// triggers, then the current buffer is sent immediately 
	/// (see <see cref="SendBuffer(LoggingEvent[])"/>). Otherwise the event 
	/// is stored in the buffer. For example, an evaluator can be used to 
	/// deliver the events immediately when an ERROR event arrives.
	/// </para>
	/// <para>
	/// The buffering appender can be configured in a <see cref="Lossy"/> mode. 
	/// By default the appender is NOT lossy. When the buffer is full all 
	/// the buffered events are sent with <see cref="SendBuffer(LoggingEvent[])"/>.
	/// If the <see cref="Lossy"/> property is set to <c>true</c> then the 
	/// buffer will not be sent when it is full, and new events arriving 
	/// in the appender will overwrite the oldest event in the buffer. 
	/// In lossy mode the buffer will only be sent when the <see cref="Evaluator"/>
	/// triggers. This can be useful behavior when you need to know about 
	/// ERROR events but not about events with a lower level, configure an 
	/// evaluator that will trigger when an ERROR event arrives, the whole 
	/// buffer will be sent which gives a history of events leading up to
	/// the ERROR event.
	/// </para>
	/// </remarks>
	/// <author>Nicko Cadell</author>
	/// <author>Gert Driesen</author>
	public abstract class BufferingAppenderSkeleton : AppenderSkeleton
	{
		#region Protected Instance Constructors

		/// <summary>
		/// Initializes a new instance of the <see cref="BufferingAppenderSkeleton" /> class.
		/// </summary>
		/// <remarks>
		/// <para>
		/// Protected default constructor to allow subclassing.
		/// </para>
		/// </remarks>
		protected BufferingAppenderSkeleton() : this(true)
		{
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="BufferingAppenderSkeleton" /> class.
		/// </summary>
		/// <param name="eventMustBeFixed">the events passed through this appender must be
		/// fixed by the time that they arrive in the derived class' <c>SendBuffer</c> method.</param>
		/// <remarks>
		/// <para>
		/// Protected constructor to allow subclassing.
		/// </para>
		/// <para>
		/// The <paramref name="eventMustBeFixed"/> should be set if the subclass
		/// expects the events delivered to be fixed even if the 
		/// <see cref="BufferSize"/> is set to zero, i.e. when no buffering occurs.
		/// </para>
		/// </remarks>
		protected BufferingAppenderSkeleton(bool eventMustBeFixed) : base()
		{
			m_eventMustBeFixed = eventMustBeFixed;
		}

		#endregion Protected Instance Constructors

		#region Public Instance Properties

		/// <summary>
		/// Gets or sets a value that indicates whether the appender is lossy.
		/// </summary>
		/// <value>
		/// <c>true</c> if the appender is lossy, otherwise <c>false</c>. The default is <c>false</c>.
		/// </value>
		/// <remarks>
		/// <para>
		/// This appender uses a buffer to store logging events before 
		/// delivering them. A triggering event causes the whole buffer
		/// to be send to the remote sink. If the buffer overruns before
		/// a triggering event then logging events could be lost. Set
		/// <see cref="Lossy"/> to <c>false</c> to prevent logging events 
		/// from being lost.
		/// </para>
		/// <para>If <see cref="Lossy"/> is set to <c>true</c> then an
		/// <see cref="Evaluator"/> must be specified.</para>
		/// </remarks>
		public bool Lossy
		{
			get { return m_lossy; }
			set { m_lossy = value; }
		}

		/// <summary>
		/// Gets or sets the size of the cyclic buffer used to hold the 
		/// logging events.
		/// </summary>
		/// <value>
		/// The size of the cyclic buffer used to hold the logging events.
		/// </value>
		/// <remarks>
		/// <para>
		/// The <see cref="BufferSize"/> option takes a positive integer
		/// representing the maximum number of logging events to collect in 
		/// a cyclic buffer. When the <see cref="BufferSize"/> is reached,
		/// oldest events are deleted as new events are added to the
		/// buffer. By default the size of the cyclic buffer is 512 events.
		/// </para>
		/// <para>
		/// If the <see cref="BufferSize"/> is set to a value less than
		/// or equal to 1 then no buffering will occur. The logging event
		/// will be delivered synchronously (depending on the <see cref="Lossy"/>
		/// and <see cref="Evaluator"/> properties). Otherwise the event will
		/// be buffered.
		/// </para>
		/// </remarks>
		public int BufferSize
		{
			get { return m_bufferSize; }
			set { m_bufferSize = value; }
		}

		/// <summary>
		/// Gets or sets the <see cref="ITriggeringEventEvaluator"/> that causes the 
		/// buffer to be sent immediately.
		/// </summary>
		/// <value>
		/// The <see cref="ITriggeringEventEvaluator"/> that causes the buffer to be
		/// sent immediately.
		/// </value>
		/// <remarks>
		/// <para>
		/// The evaluator will be called for each event that is appended to this 
		/// appender. If the evaluator triggers then the current buffer will 
		/// immediately be sent (see <see cref="SendBuffer(LoggingEvent[])"/>).
		/// </para>
		/// <para>If <see cref="Lossy"/> is set to <c>true</c> then an
		/// <see cref="Evaluator"/> must be specified.</para>
		/// </remarks>
		public ITriggeringEventEvaluator Evaluator
		{
			get { return m_evaluator; }
			set	{ m_evaluator = value; }
		}

		/// <summary>
		/// Gets or sets the value of the <see cref="ITriggeringEventEvaluator"/> to use.
		/// </summary>
		/// <value>
		/// The value of the <see cref="ITriggeringEventEvaluator"/> to use.
		/// </value>
		/// <remarks>
		/// <para>
		/// The evaluator will be called for each event that is discarded from this 
		/// appender. If the evaluator triggers then the current buffer will immediately 
		/// be sent (see <see cref="SendBuffer(LoggingEvent[])"/>).
		/// </para>
		/// </remarks>
		public ITriggeringEventEvaluator LossyEvaluator
		{
			get { return m_lossyEvaluator; }
			set	{ m_lossyEvaluator = value; }
		}

		/// <summary>
		/// Gets or sets a value indicating if only part of the logging event data
		/// should be fixed.
		/// </summary>
		/// <value>
		/// <c>true</c> if the appender should only fix part of the logging event 
		/// data, otherwise <c>false</c>. The default is <c>false</c>.
		/// </value>
		/// <remarks>
		/// <para>
		/// Setting this property to <c>true</c> will cause only part of the
		/// event data to be fixed and serialized. This will improve performance.
		/// </para>
		/// <para>
		/// See <see cref="LoggingEvent.FixVolatileData(FixFlags)"/> for more information.
		/// </para>
		/// </remarks>
		[Obsolete("Use Fix property")]
		virtual public bool OnlyFixPartialEventData
		{
			get { return (Fix == FixFlags.Partial); }
			set 
			{ 
				if (value)
				{
					Fix = FixFlags.Partial;
				}
				else
				{
					Fix = FixFlags.All;
				}
			}
		}

		/// <summary>
		/// Gets or sets a the fields that will be fixed in the event
		/// </summary>
		/// <value>
		/// The event fields that will be fixed before the event is buffered
		/// </value>
		/// <remarks>
		/// <para>
		/// The logging event needs to have certain thread specific values 
		/// captured before it can be buffered. See <see cref="LoggingEvent.Fix"/>
		/// for details.
		/// </para>
		/// </remarks>
		/// <seealso cref="LoggingEvent.Fix"/>
		virtual public FixFlags Fix
		{
			get { return m_fixFlags; }
			set { m_fixFlags = value; }
		}

		#endregion Public Instance Properties

		#region Public Methods

		/// <summary>
		/// Flush the currently buffered events
		/// </summary>
		/// <remarks>
		/// <para>
		/// Flushes any events that have been buffered.
		/// </para>
		/// <para>
		/// If the appender is buffering in <see cref="Lossy"/> mode then the contents
		/// of the buffer will NOT be flushed to the appender.
		/// </para>
		/// </remarks>
		public virtual void Flush()
		{
			Flush(false);
		}

		/// <summary>
		/// Flush the currently buffered events
		/// </summary>
		/// <param name="flushLossyBuffer">set to <c>true</c> to flush the buffer of lossy events</param>
		/// <remarks>
		/// <para>
		/// Flushes events that have been buffered. If <paramref name="flushLossyBuffer" /> is
		/// <c>false</c> then events will only be flushed if this buffer is non-lossy mode.
		/// </para>
		/// <para>
		/// If the appender is buffering in <see cref="Lossy"/> mode then the contents
		/// of the buffer will only be flushed if <paramref name="flushLossyBuffer" /> is <c>true</c>.
		/// In this case the contents of the buffer will be tested against the 
		/// <see cref="LossyEvaluator"/> and if triggering will be output. All other buffered
		/// events will be discarded.
		/// </para>
		/// <para>
		/// If <paramref name="flushLossyBuffer" /> is <c>true</c> then the buffer will always
		/// be emptied by calling this method.
		/// </para>
		/// </remarks>
		public virtual void Flush(bool flushLossyBuffer)
		{
			// This method will be called outside of the AppenderSkeleton DoAppend() method
			// therefore it needs to be protected by its own lock. This will block any
			// Appends while the buffer is flushed.
			lock(this)
			{
				if (m_cb != null && m_cb.Length > 0)
				{
					if (m_lossy)
					{
						// If we are allowed to eagerly flush from the lossy buffer
						if (flushLossyBuffer)
						{
							if (m_lossyEvaluator != null)
							{
								// Test the contents of the buffer against the lossy evaluator
								LoggingEvent[] bufferedEvents = m_cb.PopAll();
								ArrayList filteredEvents = new ArrayList(bufferedEvents.Length);

								foreach(LoggingEvent loggingEvent in bufferedEvents)
								{
									if (m_lossyEvaluator.IsTriggeringEvent(loggingEvent))
									{

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品国产精品青草| 欧美精品丝袜中出| 欧美视频在线一区二区三区| 九色|91porny| 欧美日韩在线直播| 国产精品久久毛片av大全日韩| 亚洲成人av福利| av在线综合网| 国产欧美一区二区精品性色| 欧美一区二区三区影视| 一区二区三区精品在线| thepron国产精品| 欧美变态tickling挠脚心| 亚洲成人1区2区| 欧美在线观看视频一区二区三区| 欧美情侣在线播放| 亚洲123区在线观看| 欧美日韩在线电影| 亚洲欧美在线视频观看| 成人精品视频一区二区三区 | 亚洲午夜激情av| 一本大道av伊人久久综合| 91精品午夜视频| 蜜桃一区二区三区在线| 1区2区3区精品视频| 欧美一区二区三级| 欧美亚洲国产一卡| 丁香亚洲综合激情啪啪综合| 青青青伊人色综合久久| 亚洲人成在线观看一区二区| 精品国产a毛片| 91精品国产综合久久久久久久久久| 成人av在线资源| 老汉av免费一区二区三区| 亚洲综合男人的天堂| 国产精品久久久久久久久久免费看| 欧美日韩第一区日日骚| 在线免费av一区| 99久久er热在这里只有精品15| 国产一区二区不卡老阿姨| 日韩中文字幕91| 性欧美大战久久久久久久久| ...xxx性欧美| 成人免费在线视频观看| 欧美国产乱子伦| 中文字幕av一区二区三区免费看 | 午夜激情一区二区| 舔着乳尖日韩一区| 天堂蜜桃91精品| 日韩中文字幕不卡| 免费在线视频一区| 老司机精品视频一区二区三区| 婷婷综合五月天| 免费欧美日韩国产三级电影| 日韩电影免费一区| 极品销魂美女一区二区三区| 捆绑调教美女网站视频一区| 国产自产v一区二区三区c| 国产一区高清在线| 成人一道本在线| 一本到一区二区三区| 在线观看欧美黄色| 欧美老人xxxx18| 欧美一级高清片在线观看| 欧美tk丨vk视频| 中文字幕制服丝袜一区二区三区 | 丝袜诱惑制服诱惑色一区在线观看| 日本成人中文字幕| 国产一区91精品张津瑜| eeuss鲁一区二区三区| 色偷偷久久人人79超碰人人澡| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 欧美色图天堂网| 337p日本欧洲亚洲大胆精品 | 99久久er热在这里只有精品15| 欧美亚洲国产一区在线观看网站| 日韩欧美高清在线| 亚洲日本免费电影| 色视频欧美一区二区三区| 午夜电影网亚洲视频| 亚洲精品乱码久久久久久黑人| 亚洲国产成人va在线观看天堂| 久久国产精品99精品国产| eeuss鲁片一区二区三区| 欧美精品少妇一区二区三区| 久久久青草青青国产亚洲免观| 亚洲日穴在线视频| 国产乱码一区二区三区| 欧美日韩一区二区三区不卡| 久久精品视频网| 青青国产91久久久久久| 91麻豆视频网站| 国产精品天天看| 国产伦理精品不卡| 欧美一级黄色大片| 亚洲成人自拍一区| 在线观看网站黄不卡| 国产精品乱人伦中文| 极品少妇xxxx精品少妇| 欧美精品1区2区| 亚洲成在人线在线播放| av一区二区不卡| 国产日本欧洲亚洲| 国内成人免费视频| 久久午夜老司机| 九色综合国产一区二区三区| 欧美日韩第一区日日骚| 亚洲激情中文1区| 91蜜桃在线免费视频| 最新中文字幕一区二区三区| 国产一区在线观看麻豆| 欧美电影免费观看高清完整版在线 | 日韩一区国产二区欧美三区| 亚洲国产三级在线| 欧美日韩大陆在线| 日本不卡不码高清免费观看| 制服丝袜av成人在线看| 日韩在线播放一区二区| 制服丝袜亚洲播放| 久久疯狂做爰流白浆xx| 精品国产乱码久久久久久夜甘婷婷 | 欧美日韩1区2区| 免费欧美在线视频| 久久久久亚洲蜜桃| 99麻豆久久久国产精品免费优播| 国产精品久久福利| 欧美人与性动xxxx| 国产主播一区二区三区| 国产精品久久久久影视| 91麻豆精东视频| 亚洲国产精品天堂| 久久久一区二区三区| 97超碰欧美中文字幕| 亚洲风情在线资源站| 久久综合视频网| 972aa.com艺术欧美| 亚洲成人av中文| 日韩精品一区二区三区中文精品| 成人免费的视频| 午夜亚洲国产au精品一区二区| 精品国产一区二区三区四区四| 国产91色综合久久免费分享| 亚洲精品成人a在线观看| 欧美成人r级一区二区三区| 成人av高清在线| 美女免费视频一区| 亚洲久本草在线中文字幕| 日韩一级在线观看| 在线观看免费一区| 国产成人免费网站| 国产成人啪免费观看软件| 中文字幕永久在线不卡| 欧美成人aa大片| 欧美久久久久久久久| 一本色道久久综合亚洲精品按摩| 久久99精品久久久久久动态图 | 中文字幕精品一区二区精品绿巨人| 欧美性做爰猛烈叫床潮| 99久久久国产精品| 国产99久久久精品| 国产精品一级在线| 日韩精品电影在线| 亚洲国产一二三| 亚洲综合无码一区二区| 亚洲三级理论片| 国产精品色呦呦| 欧美国产欧美综合| 亚洲国产精品99久久久久久久久| 91精品国产手机| 欧美大胆人体bbbb| 欧美大黄免费观看| 日韩欧美成人一区二区| 欧美一区中文字幕| 欧美一级国产精品| 欧美电影免费观看高清完整版在线观看 | 欧美揉bbbbb揉bbbbb| 91丨porny丨首页| 91网址在线看| 91网站黄www| 欧美中文字幕不卡| 欧美男女性生活在线直播观看| 欧美中文字幕亚洲一区二区va在线 | 亚洲男女毛片无遮挡| 夜夜嗨av一区二区三区网页| 天堂在线一区二区| 欧亚一区二区三区| 99re8在线精品视频免费播放| 色天使久久综合网天天| 欧美另类变人与禽xxxxx| 精品成人免费观看| 国产精品入口麻豆原神| 亚洲一级二级三级在线免费观看| 婷婷成人激情在线网| 国产成人a级片| 欧美人牲a欧美精品| 国产午夜精品一区二区| 成人免费在线观看入口| 日本视频免费一区| 暴力调教一区二区三区| 欧美日韩黄色一区二区|