aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/CnmMemoryCache.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/CnmMemoryCache.cs')
-rw-r--r--OpenSim/Framework/CnmMemoryCache.cs140
1 files changed, 70 insertions, 70 deletions
diff --git a/OpenSim/Framework/CnmMemoryCache.cs b/OpenSim/Framework/CnmMemoryCache.cs
index 92af331..f996cb0 100644
--- a/OpenSim/Framework/CnmMemoryCache.cs
+++ b/OpenSim/Framework/CnmMemoryCache.cs
@@ -36,14 +36,14 @@ namespace OpenSim.Framework
36 /// Cenome memory based cache to store key/value pairs (elements) limited time and/or limited size. 36 /// Cenome memory based cache to store key/value pairs (elements) limited time and/or limited size.
37 /// </summary> 37 /// </summary>
38 /// <typeparam name="TKey"> 38 /// <typeparam name="TKey">
39 /// The type of keys in the cache. 39 /// The type of keys in the cache.
40 /// </typeparam> 40 /// </typeparam>
41 /// <typeparam name="TValue"> 41 /// <typeparam name="TValue">
42 /// The type of values in the dictionary. 42 /// The type of values in the dictionary.
43 /// </typeparam> 43 /// </typeparam>
44 /// <remarks> 44 /// <remarks>
45 /// <para> 45 /// <para>
46 /// Cenome memory cache stores elements to hash table generations. When new element is being added to cache, and new size would exceed 46 /// Cenome memory cache stores elements to hash table generations. When new element is being added to cache, and new size would exceed
47 /// maximal allowed size or maximal amount of allowed element count, then elements in oldest generation are deleted. Last access time 47 /// maximal allowed size or maximal amount of allowed element count, then elements in oldest generation are deleted. Last access time
48 /// is also tracked in generation level - thus it is possible that some elements are staying in cache far beyond their expiration time. 48 /// is also tracked in generation level - thus it is possible that some elements are staying in cache far beyond their expiration time.
49 /// If elements in older generations are accessed through <see cref="TryGetValue"/> method, they are moved to newest generation. 49 /// If elements in older generations are accessed through <see cref="TryGetValue"/> method, they are moved to newest generation.
@@ -176,7 +176,7 @@ namespace OpenSim.Framework
176 } 176 }
177 177
178 /// <summary> 178 /// <summary>
179 /// Initializes a new instance of the <see cref="CnmMemoryCache{TKey,TValue}"/> class. 179 /// Initializes a new instance of the <see cref="CnmMemoryCache{TKey,TValue}"/> class.
180 /// </summary> 180 /// </summary>
181 /// <param name="maximalSize"> 181 /// <param name="maximalSize">
182 /// Maximal cache size. 182 /// Maximal cache size.
@@ -201,7 +201,7 @@ namespace OpenSim.Framework
201 } 201 }
202 202
203 /// <summary> 203 /// <summary>
204 /// Initializes a new instance of the <see cref="CnmMemoryCache{TKey,TValue}"/> class. 204 /// Initializes a new instance of the <see cref="CnmMemoryCache{TKey,TValue}"/> class.
205 /// </summary> 205 /// </summary>
206 /// <param name="maximalSize"> 206 /// <param name="maximalSize">
207 /// Maximal cache size. 207 /// Maximal cache size.
@@ -218,7 +218,7 @@ namespace OpenSim.Framework
218 } 218 }
219 219
220 /// <summary> 220 /// <summary>
221 /// Initializes a new instance of the <see cref="CnmMemoryCache{TKey,TValue}"/> class. 221 /// Initializes a new instance of the <see cref="CnmMemoryCache{TKey,TValue}"/> class.
222 /// </summary> 222 /// </summary>
223 /// <param name="maximalSize"> 223 /// <param name="maximalSize">
224 /// Maximal cache size. 224 /// Maximal cache size.
@@ -336,7 +336,7 @@ namespace OpenSim.Framework
336 /// </summary> 336 /// </summary>
337 private void CheckExpired() 337 private void CheckExpired()
338 { 338 {
339 // Do this only one in every m_operationsBetweenTimeChecks 339 // Do this only one in every m_operationsBetweenTimeChecks
340 // Fetching time is using several millisecons - it is better not to do all time. 340 // Fetching time is using several millisecons - it is better not to do all time.
341 m_operationsBetweenTimeChecks--; 341 m_operationsBetweenTimeChecks--;
342 if (m_operationsBetweenTimeChecks <= 0) 342 if (m_operationsBetweenTimeChecks <= 0)
@@ -394,7 +394,7 @@ namespace OpenSim.Framework
394 new IEnumerator<KeyValuePair<TKey, TValue>>[2]; 394 new IEnumerator<KeyValuePair<TKey, TValue>>[2];
395 395
396 /// <summary> 396 /// <summary>
397 /// Initializes a new instance of the <see cref="Enumerator"/> class. 397 /// Initializes a new instance of the <see cref="Enumerator"/> class.
398 /// </summary> 398 /// </summary>
399 /// <param name="cache"> 399 /// <param name="cache">
400 /// The cache. 400 /// The cache.
@@ -456,7 +456,7 @@ namespace OpenSim.Framework
456 /// <see langword="true"/>if the enumerator was successfully advanced to the next element; <see langword="false"/> if the enumerator has passed the end of the collection. 456 /// <see langword="true"/>if the enumerator was successfully advanced to the next element; <see langword="false"/> if the enumerator has passed the end of the collection.
457 /// </returns> 457 /// </returns>
458 /// <exception cref="T:System.InvalidOperationException"> 458 /// <exception cref="T:System.InvalidOperationException">
459 /// The collection was modified after the enumerator was created. 459 /// The collection was modified after the enumerator was created.
460 /// </exception> 460 /// </exception>
461 /// <filterpriority>2</filterpriority> 461 /// <filterpriority>2</filterpriority>
462 public bool MoveNext() 462 public bool MoveNext()
@@ -479,7 +479,7 @@ namespace OpenSim.Framework
479 /// Sets the enumerator to its initial position, which is before the first element in the collection. 479 /// Sets the enumerator to its initial position, which is before the first element in the collection.
480 /// </summary> 480 /// </summary>
481 /// <exception cref="T:System.InvalidOperationException"> 481 /// <exception cref="T:System.InvalidOperationException">
482 /// The collection was modified after the enumerator was created. 482 /// The collection was modified after the enumerator was created.
483 /// </exception> 483 /// </exception>
484 /// <filterpriority>2</filterpriority> 484 /// <filterpriority>2</filterpriority>
485 public void Reset() 485 public void Reset()
@@ -548,7 +548,7 @@ namespace OpenSim.Framework
548 private DateTime m_expirationTime1; 548 private DateTime m_expirationTime1;
549 549
550 /// <summary> 550 /// <summary>
551 /// Index to first free element. 551 /// Index to first free element.
552 /// </summary> 552 /// </summary>
553 private int m_firstFreeElement; 553 private int m_firstFreeElement;
554 554
@@ -681,8 +681,8 @@ namespace OpenSim.Framework
681 /// Next element in chain. 681 /// Next element in chain.
682 /// </summary> 682 /// </summary>
683 /// <remarks> 683 /// <remarks>
684 /// When element have value (something is stored to it), this is index of 684 /// When element have value (something is stored to it), this is index of
685 /// next element with same bucket index. When element is free, this 685 /// next element with same bucket index. When element is free, this
686 /// is index of next element in free element's list. 686 /// is index of next element in free element's list.
687 /// </remarks> 687 /// </remarks>
688 public int Next; 688 public int Next;
@@ -696,7 +696,7 @@ namespace OpenSim.Framework
696 public long Size; 696 public long Size;
697 697
698 /// <summary> 698 /// <summary>
699 /// Element's value. 699 /// Element's value.
700 /// </summary> 700 /// </summary>
701 /// <remarks> 701 /// <remarks>
702 /// It is possible that this value is <see langword="null"/> even when element 702 /// It is possible that this value is <see langword="null"/> even when element
@@ -812,7 +812,7 @@ namespace OpenSim.Framework
812 /// true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. 812 /// true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.
813 /// </returns> 813 /// </returns>
814 /// <exception cref="InvalidOperationException"> 814 /// <exception cref="InvalidOperationException">
815 /// The collection was modified after the enumerator was created. 815 /// The collection was modified after the enumerator was created.
816 /// </exception> 816 /// </exception>
817 public bool MoveNext() 817 public bool MoveNext()
818 { 818 {
@@ -841,7 +841,7 @@ namespace OpenSim.Framework
841 /// Sets the enumerator to its initial position, which is before the first element in the collection. 841 /// Sets the enumerator to its initial position, which is before the first element in the collection.
842 /// </summary> 842 /// </summary>
843 /// <exception cref="InvalidOperationException"> 843 /// <exception cref="InvalidOperationException">
844 /// The collection was modified after the enumerator was created. 844 /// The collection was modified after the enumerator was created.
845 /// </exception> 845 /// </exception>
846 /// <filterpriority>2</filterpriority> 846 /// <filterpriority>2</filterpriority>
847 public void Reset() 847 public void Reset()
@@ -931,7 +931,7 @@ namespace OpenSim.Framework
931 /// The key to locate in the <see cref="IGeneration"/>. 931 /// The key to locate in the <see cref="IGeneration"/>.
932 /// </param> 932 /// </param>
933 /// <returns> 933 /// <returns>
934 /// <see langword="true"/>if the <see cref="IGeneration"/> contains an element with the <see cref="key"/>; 934 /// <see langword="true"/>if the <see cref="IGeneration"/> contains an element with the <see cref="key"/>;
935 /// otherwise <see langword="false"/>. 935 /// otherwise <see langword="false"/>.
936 /// </returns> 936 /// </returns>
937 public bool Contains(int bucketIndex, TKey key) 937 public bool Contains(int bucketIndex, TKey key)
@@ -1014,7 +1014,7 @@ namespace OpenSim.Framework
1014 /// </returns> 1014 /// </returns>
1015 /// <remarks> 1015 /// <remarks>
1016 /// <para> 1016 /// <para>
1017 /// If element was already existing in generation and new element size fits to collection limits, 1017 /// If element was already existing in generation and new element size fits to collection limits,
1018 /// then it's value is replaced with new one and size information is updated. If element didn't 1018 /// then it's value is replaced with new one and size information is updated. If element didn't
1019 /// exists in generation before, then generation must have empty space for a new element and 1019 /// exists in generation before, then generation must have empty space for a new element and
1020 /// size must fit generation's limits, before element is added to generation. 1020 /// size must fit generation's limits, before element is added to generation.
@@ -1070,7 +1070,7 @@ namespace OpenSim.Framework
1070 if (Size - m_elements[ elementIndex ].Size + size > m_cache.m_generationMaxSize) 1070 if (Size - m_elements[ elementIndex ].Size + size > m_cache.m_generationMaxSize)
1071 { 1071 {
1072 // Generation is full 1072 // Generation is full
1073 // Remove existing element, because generation is going to be recycled to 1073 // Remove existing element, because generation is going to be recycled to
1074 // old generation and element is stored to new generation 1074 // old generation and element is stored to new generation
1075 RemoveElement(bucketIndex, elementIndex, previousIndex); 1075 RemoveElement(bucketIndex, elementIndex, previousIndex);
1076 return false; 1076 return false;
@@ -1110,12 +1110,12 @@ namespace OpenSim.Framework
1110 /// <remarks> 1110 /// <remarks>
1111 /// <para> 1111 /// <para>
1112 /// If element is not found from generation then <paramref name="value"/> and <paramref name="size"/> 1112 /// If element is not found from generation then <paramref name="value"/> and <paramref name="size"/>
1113 /// are set to default value (default(TValue) and 0). 1113 /// are set to default value (default(TValue) and 0).
1114 /// </para> 1114 /// </para>
1115 /// </remarks> 1115 /// </remarks>
1116 public bool TryGetValue(int bucketIndex, TKey key, out TValue value, out long size) 1116 public bool TryGetValue(int bucketIndex, TKey key, out TValue value, out long size)
1117 { 1117 {
1118 // Find entry index, 1118 // Find entry index,
1119 int previousIndex; 1119 int previousIndex;
1120 int elementIndex = FindElementIndex(bucketIndex, key, m_newGeneration, out previousIndex); 1120 int elementIndex = FindElementIndex(bucketIndex, key, m_newGeneration, out previousIndex);
1121 if (elementIndex == -1) 1121 if (elementIndex == -1)
@@ -1166,7 +1166,7 @@ namespace OpenSim.Framework
1166 /// </para> 1166 /// </para>
1167 /// <para> 1167 /// <para>
1168 /// There are two kind generations: "new generation" and "old generation(s)". All new elements 1168 /// There are two kind generations: "new generation" and "old generation(s)". All new elements
1169 /// are added to "new generation". 1169 /// are added to "new generation".
1170 /// </para> 1170 /// </para>
1171 /// </remarks> 1171 /// </remarks>
1172 protected interface IGeneration : IEnumerable<KeyValuePair<TKey, TValue>> 1172 protected interface IGeneration : IEnumerable<KeyValuePair<TKey, TValue>>
@@ -1211,7 +1211,7 @@ namespace OpenSim.Framework
1211 /// The key to locate in the <see cref="IGeneration"/>. 1211 /// The key to locate in the <see cref="IGeneration"/>.
1212 /// </param> 1212 /// </param>
1213 /// <returns> 1213 /// <returns>
1214 /// <see langword="true"/>if the <see cref="IGeneration"/> contains an element with the <see cref="key"/>; 1214 /// <see langword="true"/>if the <see cref="IGeneration"/> contains an element with the <see cref="key"/>;
1215 /// otherwise <see langword="false"/>. 1215 /// otherwise <see langword="false"/>.
1216 /// </returns> 1216 /// </returns>
1217 bool Contains(int bucketIndex, TKey key); 1217 bool Contains(int bucketIndex, TKey key);
@@ -1259,7 +1259,7 @@ namespace OpenSim.Framework
1259 /// </returns> 1259 /// </returns>
1260 /// <remarks> 1260 /// <remarks>
1261 /// <para> 1261 /// <para>
1262 /// If element was already existing in generation and new element size fits to collection limits, 1262 /// If element was already existing in generation and new element size fits to collection limits,
1263 /// then it's value is replaced with new one and size information is updated. If element didn't 1263 /// then it's value is replaced with new one and size information is updated. If element didn't
1264 /// exists in generation before, then generation must have empty space for a new element and 1264 /// exists in generation before, then generation must have empty space for a new element and
1265 /// size must fit generation's limits, before element is added to generation. 1265 /// size must fit generation's limits, before element is added to generation.
@@ -1288,7 +1288,7 @@ namespace OpenSim.Framework
1288 /// <remarks> 1288 /// <remarks>
1289 /// <para> 1289 /// <para>
1290 /// If element is not found from generation then <paramref name="value"/> and <paramref name="size"/> 1290 /// If element is not found from generation then <paramref name="value"/> and <paramref name="size"/>
1291 /// are set to default value (default(TValue) and 0). 1291 /// are set to default value (default(TValue) and 0).
1292 /// </para> 1292 /// </para>
1293 /// </remarks> 1293 /// </remarks>
1294 bool TryGetValue(int bucketIndex, TKey key, out TValue value, out long size); 1294 bool TryGetValue(int bucketIndex, TKey key, out TValue value, out long size);
@@ -1303,8 +1303,8 @@ namespace OpenSim.Framework
1303 /// </summary> 1303 /// </summary>
1304 /// <remarks> 1304 /// <remarks>
1305 /// <para> 1305 /// <para>
1306 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count, 1306 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count,
1307 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 1307 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
1308 /// </para> 1308 /// </para>
1309 /// </remarks> 1309 /// </remarks>
1310 /// <seealso cref="ICnmCache{TKey,TValue}.MaxCount"/> 1310 /// <seealso cref="ICnmCache{TKey,TValue}.MaxCount"/>
@@ -1324,13 +1324,13 @@ namespace OpenSim.Framework
1324 /// </value> 1324 /// </value>
1325 /// <remarks> 1325 /// <remarks>
1326 /// <para> 1326 /// <para>
1327 /// When element has been stored in <see cref="ICnmCache{TKey,TValue}"/> longer than <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> 1327 /// When element has been stored in <see cref="ICnmCache{TKey,TValue}"/> longer than <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/>
1328 /// and it is not accessed through <see cref="ICnmCache{TKey,TValue}.TryGetValue"/> method or element's value is 1328 /// and it is not accessed through <see cref="ICnmCache{TKey,TValue}.TryGetValue"/> method or element's value is
1329 /// not replaced by <see cref="ICnmCache{TKey,TValue}.Set"/> method, then it is automatically removed from the 1329 /// not replaced by <see cref="ICnmCache{TKey,TValue}.Set"/> method, then it is automatically removed from the
1330 /// <see cref="ICnmCache{TKey,TValue}"/>. 1330 /// <see cref="ICnmCache{TKey,TValue}"/>.
1331 /// </para> 1331 /// </para>
1332 /// <para> 1332 /// <para>
1333 /// It is possible that <see cref="ICnmCache{TKey,TValue}"/> implementation removes element before it's expiration time, 1333 /// It is possible that <see cref="ICnmCache{TKey,TValue}"/> implementation removes element before it's expiration time,
1334 /// because total size or count of elements stored to cache is larger than <see cref="ICnmCache{TKey,TValue}.MaxSize"/> or <see cref="ICnmCache{TKey,TValue}.MaxCount"/>. 1334 /// because total size or count of elements stored to cache is larger than <see cref="ICnmCache{TKey,TValue}.MaxSize"/> or <see cref="ICnmCache{TKey,TValue}.MaxCount"/>.
1335 /// </para> 1335 /// </para>
1336 /// <para> 1336 /// <para>
@@ -1375,17 +1375,17 @@ namespace OpenSim.Framework
1375 /// Gets a value indicating whether <see cref="ICnmCache{TKey,TValue}"/> is limiting count of elements. 1375 /// Gets a value indicating whether <see cref="ICnmCache{TKey,TValue}"/> is limiting count of elements.
1376 /// </summary> 1376 /// </summary>
1377 /// <value> 1377 /// <value>
1378 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> count of elements is limited; 1378 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> count of elements is limited;
1379 /// otherwise, <see langword="false"/>. 1379 /// otherwise, <see langword="false"/>.
1380 /// </value> 1380 /// </value>
1381 /// <remarks> 1381 /// <remarks>
1382 /// <para> 1382 /// <para>
1383 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count, 1383 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count,
1384 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 1384 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
1385 /// </para> 1385 /// </para>
1386 /// </remarks> 1386 /// </remarks>
1387 /// <seealso cref="ICnmCache{TKey,TValue}.Count"/> 1387 /// <seealso cref="ICnmCache{TKey,TValue}.Count"/>
1388 /// <seealso cref="ICnmCache{TKey,TValue}.MaxCount"/> 1388 /// <seealso cref="ICnmCache{TKey,TValue}.MaxCount"/>
1389 /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/> 1389 /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/>
1390 /// <seealso cref="ICnmCache{TKey,TValue}.IsTimeLimited"/> 1390 /// <seealso cref="ICnmCache{TKey,TValue}.IsTimeLimited"/>
1391 public bool IsCountLimited 1391 public bool IsCountLimited
@@ -1397,13 +1397,13 @@ namespace OpenSim.Framework
1397 /// Gets a value indicating whether <see cref="ICnmCache{TKey,TValue}"/> is limiting size of elements. 1397 /// Gets a value indicating whether <see cref="ICnmCache{TKey,TValue}"/> is limiting size of elements.
1398 /// </summary> 1398 /// </summary>
1399 /// <value> 1399 /// <value>
1400 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> total size of elements is limited; 1400 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> total size of elements is limited;
1401 /// otherwise, <see langword="false"/>. 1401 /// otherwise, <see langword="false"/>.
1402 /// </value> 1402 /// </value>
1403 /// <remarks> 1403 /// <remarks>
1404 /// <para> 1404 /// <para>
1405 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, 1405 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
1406 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 1406 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
1407 /// </para> 1407 /// </para>
1408 /// </remarks> 1408 /// </remarks>
1409 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/> 1409 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/>
@@ -1420,12 +1420,12 @@ namespace OpenSim.Framework
1420 /// Gets a value indicating whether or not access to the <see cref="ICnmCache{TKey,TValue}"/> is synchronized (thread safe). 1420 /// Gets a value indicating whether or not access to the <see cref="ICnmCache{TKey,TValue}"/> is synchronized (thread safe).
1421 /// </summary> 1421 /// </summary>
1422 /// <value> 1422 /// <value>
1423 /// <see langword="true"/> if access to the <see cref="ICnmCache{TKey,TValue}"/> is synchronized (thread safe); 1423 /// <see langword="true"/> if access to the <see cref="ICnmCache{TKey,TValue}"/> is synchronized (thread safe);
1424 /// otherwise, <see langword="false"/>. 1424 /// otherwise, <see langword="false"/>.
1425 /// </value> 1425 /// </value>
1426 /// <remarks> 1426 /// <remarks>
1427 /// <para> 1427 /// <para>
1428 /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/> object, use 1428 /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/> object, use
1429 /// <see cref="CnmSynchronizedCache{TKey,TValue}.Synchronized"/> in <see cref="CnmSynchronizedCache{TKey,TValue}"/> class 1429 /// <see cref="CnmSynchronizedCache{TKey,TValue}.Synchronized"/> in <see cref="CnmSynchronizedCache{TKey,TValue}"/> class
1430 /// to retrieve synchronized wrapper for <see cref="ICnmCache{TKey,TValue}"/> object. 1430 /// to retrieve synchronized wrapper for <see cref="ICnmCache{TKey,TValue}"/> object.
1431 /// </para> 1431 /// </para>
@@ -1441,13 +1441,13 @@ namespace OpenSim.Framework
1441 /// Gets a value indicating whether elements stored to <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time. 1441 /// Gets a value indicating whether elements stored to <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time.
1442 /// </summary> 1442 /// </summary>
1443 /// <value> 1443 /// <value>
1444 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> has a fixed total size of elements; 1444 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> has a fixed total size of elements;
1445 /// otherwise, <see langword="false"/>. 1445 /// otherwise, <see langword="false"/>.
1446 /// </value> 1446 /// </value>
1447 /// <remarks> 1447 /// <remarks>
1448 /// If <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time and element is not accessed through <see cref="ICnmCache{TKey,TValue}.Set"/> 1448 /// If <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time and element is not accessed through <see cref="ICnmCache{TKey,TValue}.Set"/>
1449 /// or <see cref="ICnmCache{TKey,TValue}.TryGetValue"/> methods in <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> , then element is automatically removed from 1449 /// or <see cref="ICnmCache{TKey,TValue}.TryGetValue"/> methods in <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> , then element is automatically removed from
1450 /// the cache. Depending on implementation of the <see cref="ICnmCache{TKey,TValue}"/>, some of the elements may 1450 /// the cache. Depending on implementation of the <see cref="ICnmCache{TKey,TValue}"/>, some of the elements may
1451 /// stay longer in cache. 1451 /// stay longer in cache.
1452 /// </remarks> 1452 /// </remarks>
1453 /// <seealso cref="ICnmCache{TKey,TValue}.ExpirationTime"/> 1453 /// <seealso cref="ICnmCache{TKey,TValue}.ExpirationTime"/>
@@ -1463,13 +1463,13 @@ namespace OpenSim.Framework
1463 /// Gets or sets maximal allowed count of elements that can be stored to <see cref="ICnmCache{TKey,TValue}"/>. 1463 /// Gets or sets maximal allowed count of elements that can be stored to <see cref="ICnmCache{TKey,TValue}"/>.
1464 /// </summary> 1464 /// </summary>
1465 /// <value> 1465 /// <value>
1466 /// <see cref="int.MaxValue"/>, if <see cref="ICnmCache{TKey,TValue}"/> is not limited by count of elements; 1466 /// <see cref="int.MaxValue"/>, if <see cref="ICnmCache{TKey,TValue}"/> is not limited by count of elements;
1467 /// otherwise maximal allowed count of elements. 1467 /// otherwise maximal allowed count of elements.
1468 /// </value> 1468 /// </value>
1469 /// <remarks> 1469 /// <remarks>
1470 /// <para> 1470 /// <para>
1471 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count, 1471 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count,
1472 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 1472 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
1473 /// </para> 1473 /// </para>
1474 /// </remarks> 1474 /// </remarks>
1475 public int MaxCount 1475 public int MaxCount
@@ -1496,7 +1496,7 @@ namespace OpenSim.Framework
1496 /// </value> 1496 /// </value>
1497 /// <remarks> 1497 /// <remarks>
1498 /// <para> 1498 /// <para>
1499 /// If element's size is larger than <see cref="ICnmCache{TKey,TValue}.MaxElementSize"/>, then element is 1499 /// If element's size is larger than <see cref="ICnmCache{TKey,TValue}.MaxElementSize"/>, then element is
1500 /// not added to the <see cref="ICnmCache{TKey,TValue}"/>. 1500 /// not added to the <see cref="ICnmCache{TKey,TValue}"/>.
1501 /// </para> 1501 /// </para>
1502 /// </remarks> 1502 /// </remarks>
@@ -1522,8 +1522,8 @@ namespace OpenSim.Framework
1522 /// Normally size is total bytes used by elements in the cache. But it can be any other suitable unit of measure. 1522 /// Normally size is total bytes used by elements in the cache. But it can be any other suitable unit of measure.
1523 /// </para> 1523 /// </para>
1524 /// <para> 1524 /// <para>
1525 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, 1525 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
1526 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 1526 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
1527 /// </para> 1527 /// </para>
1528 /// </remarks> 1528 /// </remarks>
1529 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/> 1529 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/>
@@ -1556,11 +1556,11 @@ namespace OpenSim.Framework
1556 /// Normally bytes, but can be any suitable unit of measure. 1556 /// Normally bytes, but can be any suitable unit of measure.
1557 /// </para> 1557 /// </para>
1558 /// <para> 1558 /// <para>
1559 /// Element's size is given when element is added or replaced by <see cref="ICnmCache{TKey,TValue}.Set"/> method. 1559 /// Element's size is given when element is added or replaced by <see cref="ICnmCache{TKey,TValue}.Set"/> method.
1560 /// </para> 1560 /// </para>
1561 /// <para> 1561 /// <para>
1562 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, 1562 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
1563 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 1563 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
1564 /// </para> 1564 /// </para>
1565 /// </remarks> 1565 /// </remarks>
1566 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/> 1566 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/>
@@ -1581,8 +1581,8 @@ namespace OpenSim.Framework
1581 /// </value> 1581 /// </value>
1582 /// <remarks> 1582 /// <remarks>
1583 /// <para> 1583 /// <para>
1584 /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/>, use <see cref="CnmSynchronizedCache{TKey,TValue}"/> 1584 /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/>, use <see cref="CnmSynchronizedCache{TKey,TValue}"/>
1585 /// method <see cref="CnmSynchronizedCache{TKey,TValue}.Synchronized"/> to retrieve synchronized wrapper interface to 1585 /// method <see cref="CnmSynchronizedCache{TKey,TValue}.Synchronized"/> to retrieve synchronized wrapper interface to
1586 /// <see cref="ICnmCache{TKey,TValue}"/>. 1586 /// <see cref="ICnmCache{TKey,TValue}"/>.
1587 /// </para> 1587 /// </para>
1588 /// </remarks> 1588 /// </remarks>
@@ -1735,7 +1735,7 @@ namespace OpenSim.Framework
1735 } 1735 }
1736 1736
1737 /// <summary> 1737 /// <summary>
1738 /// Add or replace an element with the provided <paramref name="key"/>, <paramref name="value"/> and <paramref name="size"/> to 1738 /// Add or replace an element with the provided <paramref name="key"/>, <paramref name="value"/> and <paramref name="size"/> to
1739 /// <see cref="ICnmCache{TKey,TValue}"/>. 1739 /// <see cref="ICnmCache{TKey,TValue}"/>.
1740 /// </summary> 1740 /// </summary>
1741 /// <param name="key"> 1741 /// <param name="key">
@@ -1748,7 +1748,7 @@ namespace OpenSim.Framework
1748 /// The element's size. Normally bytes, but can be any suitable unit of measure. 1748 /// The element's size. Normally bytes, but can be any suitable unit of measure.
1749 /// </param> 1749 /// </param>
1750 /// <returns> 1750 /// <returns>
1751 /// <see langword="true"/>if element has been added successfully to the <see cref="ICnmCache{TKey,TValue}"/>; 1751 /// <see langword="true"/>if element has been added successfully to the <see cref="ICnmCache{TKey,TValue}"/>;
1752 /// otherwise <see langword="false"/>. 1752 /// otherwise <see langword="false"/>.
1753 /// </returns> 1753 /// </returns>
1754 /// <exception cref="ArgumentNullException"> 1754 /// <exception cref="ArgumentNullException">
@@ -1759,17 +1759,17 @@ namespace OpenSim.Framework
1759 /// </exception> 1759 /// </exception>
1760 /// <remarks> 1760 /// <remarks>
1761 /// <para> 1761 /// <para>
1762 /// If element's <paramref name="size"/> is larger than <see cref="ICnmCache{TKey,TValue}.MaxElementSize"/>, then element is 1762 /// If element's <paramref name="size"/> is larger than <see cref="ICnmCache{TKey,TValue}.MaxElementSize"/>, then element is
1763 /// not added to the <see cref="ICnmCache{TKey,TValue}"/>, however - possible older element is 1763 /// not added to the <see cref="ICnmCache{TKey,TValue}"/>, however - possible older element is
1764 /// removed from the <see cref="ICnmCache{TKey,TValue}"/>. 1764 /// removed from the <see cref="ICnmCache{TKey,TValue}"/>.
1765 /// </para> 1765 /// </para>
1766 /// <para> 1766 /// <para>
1767 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, 1767 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
1768 /// <see cref="ICnmCache{TKey,TValue}"/>will remove less recently used elements until it can fit an new element. 1768 /// <see cref="ICnmCache{TKey,TValue}"/>will remove less recently used elements until it can fit an new element.
1769 /// </para> 1769 /// </para>
1770 /// <para> 1770 /// <para>
1771 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count, 1771 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting element count,
1772 /// <see cref="ICnmCache{TKey,TValue}"/>will remove less recently used elements until it can fit an new element. 1772 /// <see cref="ICnmCache{TKey,TValue}"/>will remove less recently used elements until it can fit an new element.
1773 /// </para> 1773 /// </para>
1774 /// </remarks> 1774 /// </remarks>
1775 /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/> 1775 /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/>
@@ -1809,15 +1809,15 @@ namespace OpenSim.Framework
1809 /// Gets the <paramref name="value"/> associated with the specified <paramref name="key"/>. 1809 /// Gets the <paramref name="value"/> associated with the specified <paramref name="key"/>.
1810 /// </summary> 1810 /// </summary>
1811 /// <returns> 1811 /// <returns>
1812 /// <see langword="true"/>if the <see cref="ICnmCache{TKey,TValue}"/> contains an element with 1812 /// <see langword="true"/>if the <see cref="ICnmCache{TKey,TValue}"/> contains an element with
1813 /// the specified key; otherwise, <see langword="false"/>. 1813 /// the specified key; otherwise, <see langword="false"/>.
1814 /// </returns> 1814 /// </returns>
1815 /// <param name="key"> 1815 /// <param name="key">
1816 /// The key whose <paramref name="value"/> to get. 1816 /// The key whose <paramref name="value"/> to get.
1817 /// </param> 1817 /// </param>
1818 /// <param name="value"> 1818 /// <param name="value">
1819 /// When this method returns, the value associated with the specified <paramref name="key"/>, 1819 /// When this method returns, the value associated with the specified <paramref name="key"/>,
1820 /// if the <paramref name="key"/> is found; otherwise, the 1820 /// if the <paramref name="key"/> is found; otherwise, the
1821 /// default value for the type of the <paramref name="value"/> parameter. This parameter is passed uninitialized. 1821 /// default value for the type of the <paramref name="value"/> parameter. This parameter is passed uninitialized.
1822 /// </param> 1822 /// </param>
1823 /// <exception cref="ArgumentNullException"> 1823 /// <exception cref="ArgumentNullException">