/// <summary>初始化 <see cref="T:System.Object" /> 类的新实例。</summary> protected BaseGenericObjectPool(BaseObjectPoolConfig baseObjectPoolConfig, IEvictionTimer timer = null) { this._timer = timer ?? new EvictionTimer(); _evictionPolicy = new DefaultEvictionPolicy <T>(); this._baseObjectPoolConfig = baseObjectPoolConfig ?? new BaseObjectPoolConfig(); this.CreationStackTrace = this.GetStackTrace(new Exception()); }
/// <summary>初始化 <see cref="T:System.Object" /> 类的新实例。</summary> protected BaseGenericObjectPool(BaseObjectPoolConfig baseObjectPoolConfig, IEvictionTimer timer = null, ILoggerFactory loggerFactory = null) { this._logger = loggerFactory?.CreateLogger(this.GetType().FullName) ?? NullLogger.Instance; this._timer = timer ?? new EvictionTimer(); this._baseObjectPoolConfig = baseObjectPoolConfig ?? new BaseObjectPoolConfig(); this.CreationStackTrace = this.GetStackTrace(new Exception()); }
public NiftyClientChannelPool(ThriftClientManager thriftClientManager, IEvictionTimer timer, ThriftyClientOptions options) : base(new NiftyClientChannelFactory(thriftClientManager, options), options.ConnectionPool, timer, options.LoggerFactory) { }