Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------ // 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
- DefaultPropertyAttribute.cs
- SiteIdentityPermission.cs
- ExtractedStateEntry.cs
- WindowsStatusBar.cs
- GridEntryCollection.cs
- InvalidEnumArgumentException.cs
- WinFormsSecurity.cs
- QuaternionAnimation.cs
- DesignTimeValidationFeature.cs
- OracleConnectionString.cs
- TextInfo.cs
- StoreContentChangedEventArgs.cs
- WeakEventManager.cs
- WindowsAuthenticationModule.cs
- SoapAttributeAttribute.cs
- FormView.cs
- ConfigurationManagerInternalFactory.cs
- OleDbPropertySetGuid.cs
- followingquery.cs
- Selection.cs
- ChtmlCommandAdapter.cs
- WinFormsComponentEditor.cs
- DisableDpiAwarenessAttribute.cs
- DictionaryContent.cs
- ProgressBar.cs
- SolidColorBrush.cs
- ConfigXmlDocument.cs
- HtmlValidatorAdapter.cs
- CryptographicAttribute.cs
- ConfigurationFileMap.cs
- WebDescriptionAttribute.cs
- ItemList.cs
- EnumType.cs
- Point3DCollectionConverter.cs
- FocusChangedEventArgs.cs
- MinMaxParagraphWidth.cs
- TextBoxDesigner.cs
- EntityDescriptor.cs
- WebPartEditorOkVerb.cs
- XmlSchemaFacet.cs
- IdnElement.cs
- AnonymousIdentificationSection.cs
- WebPartDescription.cs
- Wizard.cs
- Knowncolors.cs
- Int64AnimationUsingKeyFrames.cs
- NavigationProgressEventArgs.cs
- DiffuseMaterial.cs
- CatalogPart.cs
- CssClassPropertyAttribute.cs
- XmlArrayAttribute.cs
- Help.cs
- EmptyArray.cs
- _SpnDictionary.cs
- Matrix.cs
- Rotation3DKeyFrameCollection.cs
- IQueryable.cs
- ConfigXmlWhitespace.cs
- SortedList.cs
- StyleHelper.cs
- XomlCompilerResults.cs
- PointConverter.cs
- TextTreeObjectNode.cs
- TdsValueSetter.cs
- FontInfo.cs
- ImportFileRequest.cs
- PageAdapter.cs
- IResourceProvider.cs
- IssuanceLicense.cs
- Menu.cs
- ControlValuePropertyAttribute.cs
- XmlHierarchyData.cs
- OdbcInfoMessageEvent.cs
- ToolStripItemCollection.cs
- CustomValidator.cs
- PerformanceCounterManager.cs
- Environment.cs
- XhtmlTextWriter.cs
- XmlSchemaAny.cs
- LocalServiceSecuritySettingsElement.cs
- XPathConvert.cs
- XmlSerializationReader.cs
- Pen.cs
- BaseValidatorDesigner.cs
- CodeArrayCreateExpression.cs
- OdbcTransaction.cs
- HandoffBehavior.cs
- XmlExpressionDumper.cs
- GridViewCancelEditEventArgs.cs
- xml.cs
- VirtualDirectoryMappingCollection.cs
- Timer.cs
- SetMemberBinder.cs
- ApplicationHost.cs
- FixedSOMTable.cs
- FormCollection.cs
- UnmanagedMemoryStream.cs
- RijndaelManagedTransform.cs
- _UriTypeConverter.cs
- Clock.cs