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
- SpellerStatusTable.cs
- TransformCollection.cs
- SettingsPropertyValueCollection.cs
- NetDispatcherFaultException.cs
- ConfigPathUtility.cs
- WindowsIPAddress.cs
- HttpRuntimeSection.cs
- MaterialGroup.cs
- WinFormsComponentEditor.cs
- XmlIlGenerator.cs
- OperandQuery.cs
- QilGenerator.cs
- MonthChangedEventArgs.cs
- ClientRuntimeConfig.cs
- BufferModesCollection.cs
- WinFormsUtils.cs
- MatrixKeyFrameCollection.cs
- TreeSet.cs
- FrameworkContentElement.cs
- CustomAttributeBuilder.cs
- XmlnsCache.cs
- CodeExpressionStatement.cs
- XPathNode.cs
- HtmlTableCell.cs
- ToolStripSplitStackLayout.cs
- CodePageEncoding.cs
- KeyValuePair.cs
- ApplicationFileCodeDomTreeGenerator.cs
- SessionEndingCancelEventArgs.cs
- EpmTargetTree.cs
- DefaultShape.cs
- RichTextBox.cs
- RSAPKCS1KeyExchangeFormatter.cs
- FeatureManager.cs
- OracleParameter.cs
- ExtendedProtectionPolicy.cs
- LoadedOrUnloadedOperation.cs
- ParseNumbers.cs
- TextContainer.cs
- HtmlCommandAdapter.cs
- CacheForPrimitiveTypes.cs
- HtmlEncodedRawTextWriter.cs
- BamlRecordHelper.cs
- ApplicationException.cs
- DTCTransactionManager.cs
- PixelFormats.cs
- SessionEndingCancelEventArgs.cs
- XPathSelfQuery.cs
- TransformGroup.cs
- EmptyStringExpandableObjectConverter.cs
- PostBackTrigger.cs
- RegionIterator.cs
- FilteredSchemaElementLookUpTable.cs
- FileSystemInfo.cs
- ListViewTableRow.cs
- ExecutionContext.cs
- AsyncSerializedWorker.cs
- HttpPostedFile.cs
- BypassElementCollection.cs
- QilLoop.cs
- EventEntry.cs
- DataGridViewSelectedRowCollection.cs
- SpeechEvent.cs
- JapaneseCalendar.cs
- SqlDataSourceEnumerator.cs
- SoapEnvelopeProcessingElement.cs
- Menu.cs
- BinaryMethodMessage.cs
- TextParaClient.cs
- SqlGatherProducedAliases.cs
- DbParameterCollectionHelper.cs
- CroppedBitmap.cs
- FaultCode.cs
- AppDomainUnloadedException.cs
- NoClickablePointException.cs
- UInt64.cs
- ReadOnlyDataSource.cs
- XmlCodeExporter.cs
- ListenerSingletonConnectionReader.cs
- MimeMultiPart.cs
- XmlRawWriterWrapper.cs
- LineUtil.cs
- WindowsToolbarItemAsMenuItem.cs
- StateDesigner.cs
- StylusShape.cs
- ReadOnlyMetadataCollection.cs
- ToolboxCategoryItems.cs
- BufferModesCollection.cs
- HttpFileCollection.cs
- HttpWebRequestElement.cs
- SerialReceived.cs
- TextRenderingModeValidation.cs
- QueryInterceptorAttribute.cs
- SurrogateEncoder.cs
- TreeView.cs
- CannotUnloadAppDomainException.cs
- DirectoryRedirect.cs
- XmlTextReaderImplHelpers.cs
- CodeAttributeDeclarationCollection.cs
- TableCellCollection.cs