Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / System.Runtime.DurableInstancing / System / Runtime / Collections / ObjectCacheSettings.cs / 1305376 / ObjectCacheSettings.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.Runtime.Collections { class ObjectCacheSettings { int cacheLimit; TimeSpan idleTimeout; TimeSpan leaseTimeout; int purgeFrequency; const int DefaultCacheLimit = 64; const int DefaultPurgeFrequency = 32; static TimeSpan DefaultIdleTimeout = TimeSpan.FromMinutes(2); static TimeSpan DefaultLeaseTimeout = TimeSpan.FromMinutes(5); public ObjectCacheSettings() { this.CacheLimit = DefaultCacheLimit; this.IdleTimeout = DefaultIdleTimeout; this.LeaseTimeout = DefaultLeaseTimeout; this.PurgeFrequency = DefaultPurgeFrequency; } ObjectCacheSettings(ObjectCacheSettings other) { this.CacheLimit = other.CacheLimit; this.IdleTimeout = other.IdleTimeout; this.LeaseTimeout = other.LeaseTimeout; this.PurgeFrequency = other.PurgeFrequency; } internal ObjectCacheSettings Clone() { return new ObjectCacheSettings(this); } public int CacheLimit { get { return this.cacheLimit; } set { Fx.Assert(value >= 0, "caller should validate cache limit is non-negative"); this.cacheLimit = value; } } public TimeSpan IdleTimeout { get { return this.idleTimeout; } set { Fx.Assert(value >= TimeSpan.Zero, "caller should validate cache limit is non-negative"); this.idleTimeout = value; } } public TimeSpan LeaseTimeout { get { return this.leaseTimeout; } set { Fx.Assert(value >= TimeSpan.Zero, "caller should validate cache limit is non-negative"); this.leaseTimeout = value; } } public int PurgeFrequency { get { return this.purgeFrequency; } set { Fx.Assert(value >= 0, "caller should validate purge frequency is non-negative"); this.purgeFrequency = value; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebPartConnectionsCloseVerb.cs
- AppModelKnownContentFactory.cs
- EmptyControlCollection.cs
- WindowsTokenRoleProvider.cs
- BoundingRectTracker.cs
- LayeredChannelFactory.cs
- SQLSingleStorage.cs
- BoolLiteral.cs
- connectionpool.cs
- DataServiceRequestOfT.cs
- FixedPosition.cs
- LongTypeConverter.cs
- SoapException.cs
- WebHttpEndpointElement.cs
- CoreSwitches.cs
- ChangeNode.cs
- IChannel.cs
- DataControlFieldHeaderCell.cs
- OleDbConnectionFactory.cs
- SRef.cs
- DataGridViewComboBoxEditingControl.cs
- SocketException.cs
- Bitmap.cs
- ModuleBuilder.cs
- SQLRoleProvider.cs
- DisplayNameAttribute.cs
- MessageBuffer.cs
- TableChangeProcessor.cs
- ClientEventManager.cs
- XMLSyntaxException.cs
- ApplicationInfo.cs
- DiscardableAttribute.cs
- VectorAnimationUsingKeyFrames.cs
- WmpBitmapEncoder.cs
- Rotation3DKeyFrameCollection.cs
- InternalRelationshipCollection.cs
- OleDbSchemaGuid.cs
- XsltCompileContext.cs
- MapPathBasedVirtualPathProvider.cs
- TableFieldsEditor.cs
- HtmlTableRowCollection.cs
- AudioBase.cs
- StateMachineDesignerPaint.cs
- Point4D.cs
- Brush.cs
- ScalarRestriction.cs
- StrongNamePublicKeyBlob.cs
- AsymmetricKeyExchangeDeformatter.cs
- DataRelation.cs
- DataChangedEventManager.cs
- XmlSchemaValidationException.cs
- UserControl.cs
- ReferenceSchema.cs
- LambdaCompiler.Generated.cs
- ActiveXHelper.cs
- Control.cs
- FormatPage.cs
- SeekableReadStream.cs
- WebUtility.cs
- PopupEventArgs.cs
- WebSysDisplayNameAttribute.cs
- HotSpotCollection.cs
- ExtenderProvidedPropertyAttribute.cs
- AuthenticationModulesSection.cs
- ConnectionStringSettings.cs
- regiisutil.cs
- FamilyTypeface.cs
- ResourceExpression.cs
- SoapFormatExtensions.cs
- EncryptedData.cs
- PriorityBindingExpression.cs
- DecimalConverter.cs
- ColumnHeaderConverter.cs
- SettingsProviderCollection.cs
- EntityFunctions.cs
- SecurityTokenException.cs
- HTTPRemotingHandler.cs
- SqlProcedureAttribute.cs
- WebPartDisplayMode.cs
- BezierSegment.cs
- Parameter.cs
- ReflectionHelper.cs
- ManagedIStream.cs
- XmlChoiceIdentifierAttribute.cs
- ObjectDataSourceSelectingEventArgs.cs
- MenuItemBinding.cs
- XmlnsDictionary.cs
- shaperfactoryquerycachekey.cs
- GeometryModel3D.cs
- BitmapFrame.cs
- SqlVisitor.cs
- DbConnectionPoolGroup.cs
- NetNamedPipeBinding.cs
- ItemCollection.cs
- EditableTreeList.cs
- QueryHandler.cs
- TextEditorSpelling.cs
- UserThread.cs
- OracleConnectionStringBuilder.cs
- HitTestFilterBehavior.cs