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
- WSSecurityPolicy11.cs
- WebEventTraceProvider.cs
- AttachmentCollection.cs
- DiagnosticStrings.cs
- SQLInt64Storage.cs
- DataRelationPropertyDescriptor.cs
- ActivityWithResultValueSerializer.cs
- RsaSecurityTokenAuthenticator.cs
- GenericUriParser.cs
- PersistenceProviderBehavior.cs
- SBCSCodePageEncoding.cs
- InlineCollection.cs
- GeometryModel3D.cs
- SiteMapNodeCollection.cs
- SiteMapProvider.cs
- TreeWalker.cs
- ForceCopyBuildProvider.cs
- WindowsContainer.cs
- AnnotationDocumentPaginator.cs
- SessionStateItemCollection.cs
- UpWmlPageAdapter.cs
- AddInDeploymentState.cs
- DockPanel.cs
- AsyncSerializedWorker.cs
- FrameworkPropertyMetadata.cs
- DataGridSortCommandEventArgs.cs
- UIElementPropertyUndoUnit.cs
- WizardStepBase.cs
- FilterQuery.cs
- DbConnectionPool.cs
- Inflater.cs
- SubstitutionList.cs
- DisplayInformation.cs
- DesignerForm.cs
- HMACSHA512.cs
- HttpProfileGroupBase.cs
- AccessDataSourceView.cs
- ValidatedControlConverter.cs
- Viewport3DAutomationPeer.cs
- BookmarkOptionsHelper.cs
- MetafileHeader.cs
- EntityDataSourceDesigner.cs
- DynamicPropertyReader.cs
- ExtractedStateEntry.cs
- SettingsPropertyValueCollection.cs
- FixedDocumentPaginator.cs
- StorageEntitySetMapping.cs
- ControlIdConverter.cs
- RubberbandSelector.cs
- SessionKeyExpiredException.cs
- DbConnectionStringCommon.cs
- AutoGeneratedField.cs
- SignatureToken.cs
- ParserStreamGeometryContext.cs
- BitmapVisualManager.cs
- FtpWebRequest.cs
- TextBlock.cs
- SmtpAuthenticationManager.cs
- MD5.cs
- SignedXmlDebugLog.cs
- ObjectRef.cs
- RangeBase.cs
- TraceAsyncResult.cs
- MessageProperties.cs
- PrefixQName.cs
- Authorization.cs
- RemotingAttributes.cs
- KeyValueSerializer.cs
- XmlDataDocument.cs
- util.cs
- PersonalizationStateInfo.cs
- WebControlsSection.cs
- DispatcherHooks.cs
- SqlEnums.cs
- MenuItemCollection.cs
- KerberosSecurityTokenProvider.cs
- WaitHandleCannotBeOpenedException.cs
- WpfPayload.cs
- MappingItemCollection.cs
- UInt64Storage.cs
- ReadOnlyCollectionBase.cs
- SmiRequestExecutor.cs
- PartialArray.cs
- ExceptionUtil.cs
- X509CertificateChain.cs
- DebugInfoExpression.cs
- _NtlmClient.cs
- DetailsViewRow.cs
- SelectionListComponentEditor.cs
- ResourceBinder.cs
- GridViewRowPresenter.cs
- HierarchicalDataSourceDesigner.cs
- SqlCacheDependencyDatabase.cs
- NotSupportedException.cs
- ErrorProvider.cs
- ColorMap.cs
- NullableLongSumAggregationOperator.cs
- LinearKeyFrames.cs
- OleDbPropertySetGuid.cs
- TimelineGroup.cs