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
- DbMetaDataColumnNames.cs
- FileClassifier.cs
- TableSectionStyle.cs
- SerializationSectionGroup.cs
- RsaEndpointIdentity.cs
- SamlDelegatingWriter.cs
- AmbientValueAttribute.cs
- WebSysDisplayNameAttribute.cs
- SecurityElement.cs
- SqlConnectionPoolProviderInfo.cs
- DeflateEmulationStream.cs
- DataKey.cs
- Int16KeyFrameCollection.cs
- QilXmlWriter.cs
- RegexRunnerFactory.cs
- SharedPersonalizationStateInfo.cs
- Privilege.cs
- PlainXmlDeserializer.cs
- RadioButtonStandardAdapter.cs
- SettingsContext.cs
- RecognizedPhrase.cs
- EntityStoreSchemaGenerator.cs
- FontFamilyIdentifier.cs
- OdbcErrorCollection.cs
- Int64Animation.cs
- AdornedElementPlaceholder.cs
- CodeNamespaceCollection.cs
- ConnectionPoint.cs
- TrustManager.cs
- ObjectHandle.cs
- NamespaceList.cs
- PrinterSettings.cs
- FrugalList.cs
- XmlElementAttribute.cs
- ImageClickEventArgs.cs
- ToolStripContainer.cs
- CaretElement.cs
- RuntimeHandles.cs
- InputChannelBinder.cs
- ProxyFragment.cs
- Rect3DConverter.cs
- OpenFileDialog.cs
- MouseActionValueSerializer.cs
- StyleHelper.cs
- HtmlTableCellCollection.cs
- Vector3D.cs
- XmlSerializableWriter.cs
- UnrecognizedPolicyAssertionElement.cs
- CollectionConverter.cs
- RightsManagementManager.cs
- ListViewGroup.cs
- EntityContainerRelationshipSet.cs
- _SSPISessionCache.cs
- QilInvokeEarlyBound.cs
- PriorityBinding.cs
- StrokeSerializer.cs
- SpeechEvent.cs
- SystemMulticastIPAddressInformation.cs
- ITreeGenerator.cs
- SpotLight.cs
- DataKeyCollection.cs
- PinnedBufferMemoryStream.cs
- WebConfigurationHostFileChange.cs
- TrustManagerPromptUI.cs
- LabelLiteral.cs
- AffineTransform3D.cs
- SoundPlayerAction.cs
- ActionItem.cs
- InternalTypeHelper.cs
- TextServicesDisplayAttributePropertyRanges.cs
- DbSourceParameterCollection.cs
- BitmapData.cs
- ProviderMetadata.cs
- TextSearch.cs
- XmlDocumentSerializer.cs
- HttpPostedFile.cs
- Schedule.cs
- BaseComponentEditor.cs
- CatalogZone.cs
- basemetadatamappingvisitor.cs
- mediaeventargs.cs
- Table.cs
- BufferedGraphics.cs
- XmlBinaryReader.cs
- StringAttributeCollection.cs
- PreservationFileReader.cs
- SqlLiftWhereClauses.cs
- CodeMethodInvokeExpression.cs
- InheritanceRules.cs
- Compiler.cs
- TabControl.cs
- RuleProcessor.cs
- AttributeQuery.cs
- CorePropertiesFilter.cs
- Point4D.cs
- TextSpanModifier.cs
- RC2.cs
- CachedTypeface.cs
- UnsafeNativeMethods.cs
- DateTimeOffsetStorage.cs