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
- LockingPersistenceProvider.cs
- OperationContext.cs
- InputScope.cs
- XhtmlBasicTextBoxAdapter.cs
- ImageKeyConverter.cs
- CapabilitiesAssignment.cs
- Baml2006Reader.cs
- Options.cs
- StrokeCollectionDefaultValueFactory.cs
- URIFormatException.cs
- DocumentationServerProtocol.cs
- MsmqIntegrationInputChannel.cs
- ActivityExecutorDelegateInfo.cs
- BrowserCapabilitiesCompiler.cs
- GacUtil.cs
- TextEditorSpelling.cs
- IDispatchConstantAttribute.cs
- InputElement.cs
- ChildTable.cs
- VirtualizedContainerService.cs
- connectionpool.cs
- ReaderWriterLock.cs
- WebProxyScriptElement.cs
- SystemColors.cs
- PropertyNames.cs
- HttpListenerResponse.cs
- TextTreeExtractElementUndoUnit.cs
- HostingEnvironmentException.cs
- RightsController.cs
- MenuItemStyleCollection.cs
- CodeSnippetTypeMember.cs
- SrgsElementFactory.cs
- FlowchartSizeFeature.cs
- FileSystemWatcher.cs
- XmlIgnoreAttribute.cs
- Propagator.Evaluator.cs
- DataTemplateKey.cs
- DataGridColumnReorderingEventArgs.cs
- HitTestFilterBehavior.cs
- TextServicesDisplayAttribute.cs
- InputLanguage.cs
- RegexRunner.cs
- WebFormDesignerActionService.cs
- ImportCatalogPart.cs
- SingleTagSectionHandler.cs
- AssemblyBuilder.cs
- StoragePropertyMapping.cs
- AdornerHitTestResult.cs
- UnhandledExceptionEventArgs.cs
- CodeExporter.cs
- InputLanguageSource.cs
- InheritanceContextChangedEventManager.cs
- IDispatchConstantAttribute.cs
- SerializationStore.cs
- ObjectAnimationBase.cs
- EdmType.cs
- XmlILAnnotation.cs
- AttributeParameterInfo.cs
- EmptyQuery.cs
- InvalidDataException.cs
- WindowsAuthenticationEventArgs.cs
- AsymmetricSignatureDeformatter.cs
- BackgroundFormatInfo.cs
- ResourceReferenceKeyNotFoundException.cs
- BinaryObjectReader.cs
- DataBoundLiteralControl.cs
- ValueQuery.cs
- StringSorter.cs
- SecurityUniqueId.cs
- FileDialogCustomPlaces.cs
- ConfigurationManagerInternalFactory.cs
- ConstructorBuilder.cs
- CheckBox.cs
- DataGridViewRowStateChangedEventArgs.cs
- XmlSchemaSequence.cs
- Panel.cs
- ColumnMapVisitor.cs
- DocumentPageHost.cs
- ServiceParser.cs
- Model3DGroup.cs
- LineBreakRecord.cs
- CheckBoxAutomationPeer.cs
- Soap.cs
- PermissionSetEnumerator.cs
- SecUtil.cs
- ArrayTypeMismatchException.cs
- BaseResourcesBuildProvider.cs
- MaterializeFromAtom.cs
- ServiceProviders.cs
- OpCopier.cs
- ContourSegment.cs
- CreateUserWizard.cs
- AppDomainAttributes.cs
- TextParagraphProperties.cs
- XmlObjectSerializer.cs
- AnnotationResource.cs
- Blend.cs
- FixedSOMLineCollection.cs
- PathGeometry.cs
- EntityDataSource.cs