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
- CutCopyPasteHelper.cs
- ToolStripContainer.cs
- QilPatternFactory.cs
- OleCmdHelper.cs
- SelectingProviderEventArgs.cs
- TextTreeUndoUnit.cs
- XmlSchemaObject.cs
- TextParentUndoUnit.cs
- CanonicalizationDriver.cs
- IItemProperties.cs
- coordinator.cs
- InvokeMethodDesigner.xaml.cs
- CommandID.cs
- followingquery.cs
- AppDomainInstanceProvider.cs
- InternalSafeNativeMethods.cs
- DBSqlParserColumnCollection.cs
- HttpContext.cs
- ObfuscationAttribute.cs
- RelationshipConverter.cs
- StyleCollection.cs
- CategoryAttribute.cs
- XmlQueryType.cs
- PointCollectionConverter.cs
- SelectedGridItemChangedEvent.cs
- ImageFormat.cs
- FixedPageStructure.cs
- SqlBuilder.cs
- ISAPIRuntime.cs
- FormatPage.cs
- VirtualPathProvider.cs
- OrderToken.cs
- InfoCardKeyedHashAlgorithm.cs
- RedistVersionInfo.cs
- SuppressMergeCheckAttribute.cs
- CodeGenerator.cs
- Utility.cs
- LiteralDesigner.cs
- ConcurrentQueue.cs
- Soap.cs
- SHA1CryptoServiceProvider.cs
- SafeNativeMethods.cs
- ListMarkerLine.cs
- DefaultMemberAttribute.cs
- BoundField.cs
- PrintingPermissionAttribute.cs
- EmptyEnumerator.cs
- Font.cs
- ExceptionWrapper.cs
- PathGeometry.cs
- MessageUtil.cs
- WaitHandle.cs
- RegexWorker.cs
- Transactions.cs
- SerializationFieldInfo.cs
- IISUnsafeMethods.cs
- WebServicesSection.cs
- TimeStampChecker.cs
- RoutedEventValueSerializer.cs
- BaseParser.cs
- UriTemplateTrieLocation.cs
- BinaryObjectReader.cs
- Image.cs
- ToolStripStatusLabel.cs
- ValueUtilsSmi.cs
- HebrewCalendar.cs
- ViewStateException.cs
- ReachIDocumentPaginatorSerializer.cs
- ResXResourceSet.cs
- ACL.cs
- Sequence.cs
- ListParaClient.cs
- DateTimeOffset.cs
- ScrollViewer.cs
- peernodestatemanager.cs
- ViewManager.cs
- AssertSection.cs
- RepeatBehavior.cs
- StickyNoteHelper.cs
- VariableQuery.cs
- WizardStepBase.cs
- MILUtilities.cs
- EUCJPEncoding.cs
- Add.cs
- Size.cs
- TreeNodeStyleCollection.cs
- MimeMultiPart.cs
- DecoderBestFitFallback.cs
- BitVec.cs
- CodeSnippetExpression.cs
- DbException.cs
- DBConnectionString.cs
- ResourcesBuildProvider.cs
- XmlCustomFormatter.cs
- TypeBuilder.cs
- CodeNamespaceCollection.cs
- Calendar.cs
- ClientSideProviderDescription.cs
- ValueOfAction.cs
- RuntimeWrappedException.cs