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
- MessageBox.cs
- DefaultEventAttribute.cs
- RelationHandler.cs
- Parallel.cs
- DataGridClipboardHelper.cs
- BitmapEffectRenderDataResource.cs
- XmlSchemaComplexContentExtension.cs
- Cloud.cs
- BamlRecordReader.cs
- MsmqInputSessionChannelListener.cs
- PathGeometry.cs
- RegexMatchCollection.cs
- DesignBindingConverter.cs
- IndependentAnimationStorage.cs
- RegisteredArrayDeclaration.cs
- GetLastErrorDetailsRequest.cs
- AssemblyGen.cs
- ReflectionHelper.cs
- RoleManagerModule.cs
- ColorConvertedBitmap.cs
- BamlWriter.cs
- DataGridViewCellFormattingEventArgs.cs
- XmlName.cs
- MembershipSection.cs
- TimeSpanValidatorAttribute.cs
- AutomationPropertyInfo.cs
- LinkButton.cs
- SHA1.cs
- RelationshipSet.cs
- XmlTextAttribute.cs
- CodeValidator.cs
- ImageUrlEditor.cs
- SingleQueryOperator.cs
- WindowsListViewSubItem.cs
- XmlUrlResolver.cs
- PropertyIDSet.cs
- ConnectionConsumerAttribute.cs
- Container.cs
- SchemaImporterExtensionElement.cs
- Attributes.cs
- NativeCompoundFileAPIs.cs
- AssemblyInfo.cs
- RedistVersionInfo.cs
- TextContainerHelper.cs
- UIEndRequest.cs
- EncoderNLS.cs
- DataGridViewCellConverter.cs
- Rect3D.cs
- TextCharacters.cs
- UserValidatedEventArgs.cs
- MethodCallTranslator.cs
- InsufficientExecutionStackException.cs
- DataServiceHostFactory.cs
- BaseTemplateCodeDomTreeGenerator.cs
- StrongNameUtility.cs
- DataGridViewCellValidatingEventArgs.cs
- TextRangeAdaptor.cs
- Track.cs
- XmlNamedNodeMap.cs
- Material.cs
- Point4DValueSerializer.cs
- OrderByBuilder.cs
- CalendarTable.cs
- ColorConverter.cs
- HandlerMappingMemo.cs
- StorageSetMapping.cs
- OracleConnectionStringBuilder.cs
- XmlSchemaSimpleTypeList.cs
- VisualTreeHelper.cs
- AuthenticationModuleElementCollection.cs
- LogLogRecord.cs
- SelectionWordBreaker.cs
- WebConfigurationHostFileChange.cs
- ActiveXHelper.cs
- TransactionChannelFactory.cs
- OpacityConverter.cs
- WebBrowser.cs
- RealizedColumnsBlock.cs
- XPathDocumentNavigator.cs
- StorageComplexTypeMapping.cs
- FullTextBreakpoint.cs
- TransformerTypeCollection.cs
- SqlServer2KCompatibilityAnnotation.cs
- GreenMethods.cs
- DesigntimeLicenseContext.cs
- MatrixConverter.cs
- HttpServerUtilityBase.cs
- AssertFilter.cs
- EncryptedXml.cs
- Rectangle.cs
- DeploymentSection.cs
- StringUtil.cs
- XmlExpressionDumper.cs
- BigInt.cs
- GroupBoxAutomationPeer.cs
- QilUnary.cs
- ContentHostHelper.cs
- ItemType.cs
- ServerValidateEventArgs.cs
- ToolBarButtonClickEvent.cs