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
- CodeTypeParameterCollection.cs
- TextDecoration.cs
- DataGridViewSortCompareEventArgs.cs
- SqlBuilder.cs
- RtfControls.cs
- ActivityMarkupSerializer.cs
- Native.cs
- PerformanceCounterManager.cs
- CompilerCollection.cs
- LineBreakRecord.cs
- TextServicesProperty.cs
- ForwardPositionQuery.cs
- OpenTypeCommon.cs
- ToolStripItemTextRenderEventArgs.cs
- IgnoreDataMemberAttribute.cs
- InvalidateEvent.cs
- InkCanvasFeedbackAdorner.cs
- KeyTimeConverter.cs
- OdbcDataReader.cs
- ZipIOExtraFieldZip64Element.cs
- SymbolDocumentInfo.cs
- PrintController.cs
- UnsafeNativeMethods.cs
- FileAuthorizationModule.cs
- WindowsGraphicsCacheManager.cs
- MILUtilities.cs
- WindowsProgressbar.cs
- Rect3DValueSerializer.cs
- SHA256Cng.cs
- Rotation3DAnimation.cs
- CommonObjectSecurity.cs
- FileFormatException.cs
- WebMessageEncodingElement.cs
- PointUtil.cs
- CodeArrayCreateExpression.cs
- SortQueryOperator.cs
- AspCompat.cs
- SynchronizedDispatch.cs
- PageCodeDomTreeGenerator.cs
- TypeReference.cs
- HttpResponse.cs
- AutomationProperties.cs
- GetIndexBinder.cs
- TileBrush.cs
- FacetValues.cs
- _SpnDictionary.cs
- SinglePageViewer.cs
- NamespaceList.cs
- InvalidCommandTreeException.cs
- DetailsViewDeletedEventArgs.cs
- XmlSchemaGroupRef.cs
- CodeMemberEvent.cs
- SharedStatics.cs
- Variable.cs
- OracleRowUpdatingEventArgs.cs
- XmlSchemaDatatype.cs
- NopReturnReader.cs
- EncoderExceptionFallback.cs
- IOThreadTimer.cs
- AtomServiceDocumentSerializer.cs
- PropertyChangingEventArgs.cs
- ImageMetadata.cs
- OracleConnectionFactory.cs
- DropShadowBitmapEffect.cs
- DataListCommandEventArgs.cs
- Location.cs
- XmlSchemaProviderAttribute.cs
- ExtenderControl.cs
- SplineQuaternionKeyFrame.cs
- LinqDataSourceDeleteEventArgs.cs
- StreamMarshaler.cs
- _SslState.cs
- NamedPipeHostedTransportConfiguration.cs
- VirtualizingPanel.cs
- RecommendedAsConfigurableAttribute.cs
- Point3DValueSerializer.cs
- ObfuscateAssemblyAttribute.cs
- ThreadInterruptedException.cs
- TemplateContent.cs
- MessageBox.cs
- PropertyGridDesigner.cs
- infer.cs
- DefaultMemberAttribute.cs
- SQLUtility.cs
- TextServicesProperty.cs
- WithStatement.cs
- ContextInformation.cs
- TcpTransportElement.cs
- _OverlappedAsyncResult.cs
- WhereQueryOperator.cs
- SystemMulticastIPAddressInformation.cs
- CapabilitiesPattern.cs
- EventSourceCreationData.cs
- AttributeCollection.cs
- Visitors.cs
- Vector3DCollectionConverter.cs
- GridViewCellAutomationPeer.cs
- basevalidator.cs
- Color.cs
- AsnEncodedData.cs