diff options
author | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
commit | b16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch) | |
tree | 6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Region/CoreModules/Asset | |
parent | Make it possible to disable the bakes module in the way it is described in co... (diff) | |
download | opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2 opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz |
Massive tab and trailing space cleanup
Diffstat (limited to 'OpenSim/Region/CoreModules/Asset')
5 files changed, 49 insertions, 49 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs index 14b0280..23c1f03 100644 --- a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs | |||
@@ -41,16 +41,16 @@ namespace OpenSim.Region.CoreModules.Asset | |||
41 | /// </summary> | 41 | /// </summary> |
42 | /// <remarks> | 42 | /// <remarks> |
43 | /// <para> | 43 | /// <para> |
44 | /// Cache is enabled by setting "AssetCaching" configuration to value "CenomeMemoryAssetCache". | 44 | /// Cache is enabled by setting "AssetCaching" configuration to value "CenomeMemoryAssetCache". |
45 | /// When cache is successfully enable log should have message | 45 | /// When cache is successfully enable log should have message |
46 | /// "[ASSET CACHE]: Cenome asset cache enabled (MaxSize = XXX bytes, MaxCount = XXX, ExpirationTime = XXX)". | 46 | /// "[ASSET CACHE]: Cenome asset cache enabled (MaxSize = XXX bytes, MaxCount = XXX, ExpirationTime = XXX)". |
47 | /// </para> | 47 | /// </para> |
48 | /// <para> | 48 | /// <para> |
49 | /// Cache's size is limited by two parameters: | 49 | /// Cache's size is limited by two parameters: |
50 | /// maximal allowed size in bytes and maximal allowed asset count. When new asset | 50 | /// maximal allowed size in bytes and maximal allowed asset count. When new asset |
51 | /// is added to cache that have achieved either size or count limitation, cache | 51 | /// is added to cache that have achieved either size or count limitation, cache |
52 | /// will automatically remove less recently used assets from cache. Additionally | 52 | /// will automatically remove less recently used assets from cache. Additionally |
53 | /// asset's lifetime is controlled by expiration time. | 53 | /// asset's lifetime is controlled by expiration time. |
54 | /// </para> | 54 | /// </para> |
55 | /// <para> | 55 | /// <para> |
56 | /// <list type="table"> | 56 | /// <list type="table"> |
@@ -94,7 +94,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
94 | public class CenomeMemoryAssetCache : IAssetCache, ISharedRegionModule | 94 | public class CenomeMemoryAssetCache : IAssetCache, ISharedRegionModule |
95 | { | 95 | { |
96 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 96 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
97 | 97 | ||
98 | /// <summary> | 98 | /// <summary> |
99 | /// Cache's default maximal asset count. | 99 | /// Cache's default maximal asset count. |
100 | /// </summary> | 100 | /// </summary> |
@@ -119,7 +119,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
119 | /// Asset's default expiration time in the cache. | 119 | /// Asset's default expiration time in the cache. |
120 | /// </summary> | 120 | /// </summary> |
121 | public static readonly TimeSpan DefaultExpirationTime = TimeSpan.FromMinutes(30.0); | 121 | public static readonly TimeSpan DefaultExpirationTime = TimeSpan.FromMinutes(30.0); |
122 | 122 | ||
123 | /// <summary> | 123 | /// <summary> |
124 | /// Cache object. | 124 | /// Cache object. |
125 | /// </summary> | 125 | /// </summary> |
@@ -213,7 +213,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
213 | if (asset != null) | 213 | if (asset != null) |
214 | { | 214 | { |
215 | // m_log.DebugFormat("[CENOME ASSET CACHE]: Caching asset {0}", asset.ID); | 215 | // m_log.DebugFormat("[CENOME ASSET CACHE]: Caching asset {0}", asset.ID); |
216 | 216 | ||
217 | long size = asset.Data != null ? asset.Data.Length : 1; | 217 | long size = asset.Data != null ? asset.Data.Length : 1; |
218 | m_cache.Set(asset.ID, asset, size); | 218 | m_cache.Set(asset.ID, asset, size); |
219 | m_cachedCount++; | 219 | m_cachedCount++; |
@@ -246,7 +246,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
246 | } | 246 | } |
247 | 247 | ||
248 | /// <summary> | 248 | /// <summary> |
249 | /// Get asset stored | 249 | /// Get asset stored |
250 | /// </summary> | 250 | /// </summary> |
251 | /// <param name="id"> | 251 | /// <param name="id"> |
252 | /// The asset's id. | 252 | /// The asset's id. |
@@ -283,7 +283,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
283 | 283 | ||
284 | // if (null == assetBase) | 284 | // if (null == assetBase) |
285 | // m_log.DebugFormat("[CENOME ASSET CACHE]: Asset {0} not in cache", id); | 285 | // m_log.DebugFormat("[CENOME ASSET CACHE]: Asset {0} not in cache", id); |
286 | 286 | ||
287 | return assetBase; | 287 | return assetBase; |
288 | } | 288 | } |
289 | 289 | ||
@@ -299,7 +299,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
299 | get { return "CenomeMemoryAssetCache"; } | 299 | get { return "CenomeMemoryAssetCache"; } |
300 | } | 300 | } |
301 | 301 | ||
302 | public Type ReplaceableInterface | 302 | public Type ReplaceableInterface |
303 | { | 303 | { |
304 | get { return null; } | 304 | get { return null; } |
305 | } | 305 | } |
@@ -349,7 +349,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
349 | 349 | ||
350 | if (name != Name) | 350 | if (name != Name) |
351 | return; | 351 | return; |
352 | 352 | ||
353 | long maxSize = DefaultMaxSize; | 353 | long maxSize = DefaultMaxSize; |
354 | int maxCount = DefaultMaxCount; | 354 | int maxCount = DefaultMaxCount; |
355 | TimeSpan expirationTime = DefaultExpirationTime; | 355 | TimeSpan expirationTime = DefaultExpirationTime; |
diff --git a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs index 82bc5cc..51fc3d1 100644 --- a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs | |||
@@ -54,7 +54,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
54 | get { return "CoreAssetCache"; } | 54 | get { return "CoreAssetCache"; } |
55 | } | 55 | } |
56 | 56 | ||
57 | public Type ReplaceableInterface | 57 | public Type ReplaceableInterface |
58 | { | 58 | { |
59 | get { return null; } | 59 | get { return null; } |
60 | } | 60 | } |
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 84e13a0..187f090 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | |||
@@ -25,7 +25,7 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | // Uncomment to make asset Get requests for existing | 28 | // Uncomment to make asset Get requests for existing |
29 | // #define WAIT_ON_INPROGRESS_REQUESTS | 29 | // #define WAIT_ON_INPROGRESS_REQUESTS |
30 | 30 | ||
31 | using System; | 31 | using System; |
@@ -113,7 +113,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
113 | private IAssetService m_AssetService; | 113 | private IAssetService m_AssetService; |
114 | private List<Scene> m_Scenes = new List<Scene>(); | 114 | private List<Scene> m_Scenes = new List<Scene>(); |
115 | private object timerLock = new object(); | 115 | private object timerLock = new object(); |
116 | 116 | ||
117 | private Dictionary<string,WeakReference> weakAssetReferences = new Dictionary<string, WeakReference>(); | 117 | private Dictionary<string,WeakReference> weakAssetReferences = new Dictionary<string, WeakReference>(); |
118 | private object weakAssetReferencesLock = new object(); | 118 | private object weakAssetReferencesLock = new object(); |
119 | private bool m_updateFileTimeOnCacheHit = false; | 119 | private bool m_updateFileTimeOnCacheHit = false; |
@@ -124,7 +124,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
124 | m_InvalidChars.AddRange(Path.GetInvalidFileNameChars()); | 124 | m_InvalidChars.AddRange(Path.GetInvalidFileNameChars()); |
125 | } | 125 | } |
126 | 126 | ||
127 | public Type ReplaceableInterface | 127 | public Type ReplaceableInterface |
128 | { | 128 | { |
129 | get { return null; } | 129 | get { return null; } |
130 | } | 130 | } |
@@ -137,7 +137,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
137 | public void Initialise(IConfigSource source) | 137 | public void Initialise(IConfigSource source) |
138 | { | 138 | { |
139 | IConfig moduleConfig = source.Configs["Modules"]; | 139 | IConfig moduleConfig = source.Configs["Modules"]; |
140 | 140 | ||
141 | if (moduleConfig != null) | 141 | if (moduleConfig != null) |
142 | { | 142 | { |
143 | string name = moduleConfig.GetString("AssetCaching", String.Empty); | 143 | string name = moduleConfig.GetString("AssetCaching", String.Empty); |
@@ -169,11 +169,11 @@ namespace OpenSim.Region.CoreModules.Asset | |||
169 | m_negativeExpiration = assetConfig.GetInt("NegativeCacheTimeout", m_negativeExpiration); | 169 | m_negativeExpiration = assetConfig.GetInt("NegativeCacheTimeout", m_negativeExpiration); |
170 | m_negativeCacheSliding = assetConfig.GetBoolean("NegativeCacheSliding", m_negativeCacheSliding); | 170 | m_negativeCacheSliding = assetConfig.GetBoolean("NegativeCacheSliding", m_negativeCacheSliding); |
171 | m_updateFileTimeOnCacheHit = assetConfig.GetBoolean("UpdateFileTimeOnCacheHit", m_updateFileTimeOnCacheHit); | 171 | m_updateFileTimeOnCacheHit = assetConfig.GetBoolean("UpdateFileTimeOnCacheHit", m_updateFileTimeOnCacheHit); |
172 | 172 | ||
173 | #if WAIT_ON_INPROGRESS_REQUESTS | 173 | #if WAIT_ON_INPROGRESS_REQUESTS |
174 | m_WaitOnInprogressTimeout = assetConfig.GetInt("WaitOnInprogressTimeout", 3000); | 174 | m_WaitOnInprogressTimeout = assetConfig.GetInt("WaitOnInprogressTimeout", 3000); |
175 | #endif | 175 | #endif |
176 | 176 | ||
177 | m_LogLevel = assetConfig.GetInt("LogLevel", m_LogLevel); | 177 | m_LogLevel = assetConfig.GetInt("LogLevel", m_LogLevel); |
178 | m_HitRateDisplay = (ulong)assetConfig.GetLong("HitRateDisplay", (long)m_HitRateDisplay); | 178 | m_HitRateDisplay = (ulong)assetConfig.GetLong("HitRateDisplay", (long)m_HitRateDisplay); |
179 | 179 | ||
@@ -266,7 +266,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
266 | { | 266 | { |
267 | m_CacheCleanTimer = new System.Timers.Timer(m_FileExpirationCleanupTimer.TotalMilliseconds); | 267 | m_CacheCleanTimer = new System.Timers.Timer(m_FileExpirationCleanupTimer.TotalMilliseconds); |
268 | m_CacheCleanTimer.AutoReset = false; | 268 | m_CacheCleanTimer.AutoReset = false; |
269 | m_CacheCleanTimer.Elapsed += CleanupExpiredFiles; | 269 | m_CacheCleanTimer.Elapsed += CleanupExpiredFiles; |
270 | m_CacheCleanTimer.Start(); | 270 | m_CacheCleanTimer.Start(); |
271 | m_timerRunning = true; | 271 | m_timerRunning = true; |
272 | } | 272 | } |
@@ -274,7 +274,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
274 | } | 274 | } |
275 | if (m_MemoryCacheEnabled) | 275 | if (m_MemoryCacheEnabled) |
276 | m_MemoryCache = new ExpiringCache<string, AssetBase>(); | 276 | m_MemoryCache = new ExpiringCache<string, AssetBase>(); |
277 | 277 | ||
278 | lock(weakAssetReferencesLock) | 278 | lock(weakAssetReferencesLock) |
279 | weakAssetReferences = new Dictionary<string, WeakReference>(); | 279 | weakAssetReferences = new Dictionary<string, WeakReference>(); |
280 | } | 280 | } |
@@ -306,11 +306,11 @@ namespace OpenSim.Region.CoreModules.Asset | |||
306 | if (File.Exists(filename)) | 306 | if (File.Exists(filename)) |
307 | { | 307 | { |
308 | UpdateFileLastAccessTime(filename); | 308 | UpdateFileLastAccessTime(filename); |
309 | } | 309 | } |
310 | else | 310 | else |
311 | { | 311 | { |
312 | // Once we start writing, make sure we flag that we're writing | 312 | // Once we start writing, make sure we flag that we're writing |
313 | // that object to the cache so that we don't try to write the | 313 | // that object to the cache so that we don't try to write the |
314 | // same file multiple times. | 314 | // same file multiple times. |
315 | lock (m_CurrentlyWriting) | 315 | lock (m_CurrentlyWriting) |
316 | { | 316 | { |
@@ -439,7 +439,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
439 | /// <param name="id"></param> | 439 | /// <param name="id"></param> |
440 | /// <returns>An asset retrieved from the file cache. null if there was a problem retrieving an asset.</returns> | 440 | /// <returns>An asset retrieved from the file cache. null if there was a problem retrieving an asset.</returns> |
441 | private AssetBase GetFromFileCache(string id) | 441 | private AssetBase GetFromFileCache(string id) |
442 | { | 442 | { |
443 | string filename = GetFileName(id); | 443 | string filename = GetFileName(id); |
444 | 444 | ||
445 | #if WAIT_ON_INPROGRESS_REQUESTS | 445 | #if WAIT_ON_INPROGRESS_REQUESTS |
@@ -649,7 +649,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
649 | m_MemoryCache = new ExpiringCache<string, AssetBase>(); | 649 | m_MemoryCache = new ExpiringCache<string, AssetBase>(); |
650 | if (m_negativeCacheEnabled) | 650 | if (m_negativeCacheEnabled) |
651 | m_negativeCache = new ExpiringCache<string, object>(); | 651 | m_negativeCache = new ExpiringCache<string, object>(); |
652 | 652 | ||
653 | lock(weakAssetReferencesLock) | 653 | lock(weakAssetReferencesLock) |
654 | weakAssetReferences = new Dictionary<string, WeakReference>(); | 654 | weakAssetReferences = new Dictionary<string, WeakReference>(); |
655 | } | 655 | } |
@@ -659,7 +659,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
659 | if (m_LogLevel >= 2) | 659 | if (m_LogLevel >= 2) |
660 | m_log.DebugFormat("[FLOTSAM ASSET CACHE]: Checking for expired files older then {0}.", m_FileExpiration); | 660 | m_log.DebugFormat("[FLOTSAM ASSET CACHE]: Checking for expired files older then {0}.", m_FileExpiration); |
661 | 661 | ||
662 | lock(timerLock) | 662 | lock(timerLock) |
663 | { | 663 | { |
664 | if(!m_timerRunning || m_cleanupRunning) | 664 | if(!m_timerRunning || m_cleanupRunning) |
665 | return; | 665 | return; |
@@ -687,8 +687,8 @@ namespace OpenSim.Region.CoreModules.Asset | |||
687 | } | 687 | } |
688 | 688 | ||
689 | /// <summary> | 689 | /// <summary> |
690 | /// Recurses through specified directory checking for asset files last | 690 | /// Recurses through specified directory checking for asset files last |
691 | /// accessed prior to the specified purge line and deletes them. Also | 691 | /// accessed prior to the specified purge line and deletes them. Also |
692 | /// removes empty tier directories. | 692 | /// removes empty tier directories. |
693 | /// </summary> | 693 | /// </summary> |
694 | /// <param name="dir"></param> | 694 | /// <param name="dir"></param> |
@@ -720,7 +720,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
720 | else if (dirSize >= m_CacheWarnAt) | 720 | else if (dirSize >= m_CacheWarnAt) |
721 | { | 721 | { |
722 | m_log.WarnFormat( | 722 | m_log.WarnFormat( |
723 | "[FLOTSAM ASSET CACHE]: Cache folder exceeded CacheWarnAt limit {0} {1}. Suggest increasing tiers, tier length, or reducing cache expiration", | 723 | "[FLOTSAM ASSET CACHE]: Cache folder exceeded CacheWarnAt limit {0} {1}. Suggest increasing tiers, tier length, or reducing cache expiration", |
724 | dir, dirSize); | 724 | dir, dirSize); |
725 | } | 725 | } |
726 | } | 726 | } |
@@ -760,7 +760,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
760 | } | 760 | } |
761 | 761 | ||
762 | /// <summary> | 762 | /// <summary> |
763 | /// Writes a file to the file cache, creating any nessesary | 763 | /// Writes a file to the file cache, creating any nessesary |
764 | /// tier directories along the way | 764 | /// tier directories along the way |
765 | /// </summary> | 765 | /// </summary> |
766 | /// <param name="filename"></param> | 766 | /// <param name="filename"></param> |
@@ -772,7 +772,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
772 | // Make sure the target cache directory exists | 772 | // Make sure the target cache directory exists |
773 | string directory = Path.GetDirectoryName(filename); | 773 | string directory = Path.GetDirectoryName(filename); |
774 | 774 | ||
775 | // Write file first to a temp name, so that it doesn't look | 775 | // Write file first to a temp name, so that it doesn't look |
776 | // like it's already cached while it's still writing. | 776 | // like it's already cached while it's still writing. |
777 | string tempname = Path.Combine(directory, Path.GetRandomFileName()); | 777 | string tempname = Path.Combine(directory, Path.GetRandomFileName()); |
778 | 778 | ||
@@ -784,7 +784,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
784 | { | 784 | { |
785 | Directory.CreateDirectory(directory); | 785 | Directory.CreateDirectory(directory); |
786 | } | 786 | } |
787 | 787 | ||
788 | stream = File.Open(tempname, FileMode.Create); | 788 | stream = File.Open(tempname, FileMode.Create); |
789 | BinaryFormatter bformatter = new BinaryFormatter(); | 789 | BinaryFormatter bformatter = new BinaryFormatter(); |
790 | bformatter.Serialize(stream, asset); | 790 | bformatter.Serialize(stream, asset); |
@@ -818,7 +818,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
818 | // This situation occurs fairly rarely anyway. We assume in this that moves are atomic on the | 818 | // This situation occurs fairly rarely anyway. We assume in this that moves are atomic on the |
819 | // filesystem. | 819 | // filesystem. |
820 | File.Move(tempname, filename); | 820 | File.Move(tempname, filename); |
821 | 821 | ||
822 | if (m_LogLevel >= 2) | 822 | if (m_LogLevel >= 2) |
823 | m_log.DebugFormat("[FLOTSAM ASSET CACHE]: Cache Stored :: {0}", asset.ID); | 823 | m_log.DebugFormat("[FLOTSAM ASSET CACHE]: Cache Stored :: {0}", asset.ID); |
824 | } | 824 | } |
@@ -875,7 +875,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
875 | { | 875 | { |
876 | string RegionCacheStatusFile = Path.Combine(m_CacheDirectory, "RegionStatus_" + regionID.ToString() + ".fac"); | 876 | string RegionCacheStatusFile = Path.Combine(m_CacheDirectory, "RegionStatus_" + regionID.ToString() + ".fac"); |
877 | 877 | ||
878 | try | 878 | try |
879 | { | 879 | { |
880 | if (File.Exists(RegionCacheStatusFile)) | 880 | if (File.Exists(RegionCacheStatusFile)) |
881 | { | 881 | { |
@@ -884,7 +884,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
884 | else | 884 | else |
885 | { | 885 | { |
886 | File.WriteAllText( | 886 | File.WriteAllText( |
887 | RegionCacheStatusFile, | 887 | RegionCacheStatusFile, |
888 | "Please do not delete this file unless you are manually clearing your Flotsam Asset Cache."); | 888 | "Please do not delete this file unless you are manually clearing your Flotsam Asset Cache."); |
889 | } | 889 | } |
890 | } | 890 | } |
@@ -892,14 +892,14 @@ namespace OpenSim.Region.CoreModules.Asset | |||
892 | { | 892 | { |
893 | m_log.Warn( | 893 | m_log.Warn( |
894 | string.Format( | 894 | string.Format( |
895 | "[FLOTSAM ASSET CACHE]: Could not stamp region status file for region {0}. Exception ", | 895 | "[FLOTSAM ASSET CACHE]: Could not stamp region status file for region {0}. Exception ", |
896 | regionID), | 896 | regionID), |
897 | e); | 897 | e); |
898 | } | 898 | } |
899 | } | 899 | } |
900 | 900 | ||
901 | /// <summary> | 901 | /// <summary> |
902 | /// Iterates through all Scenes, doing a deep scan through assets | 902 | /// Iterates through all Scenes, doing a deep scan through assets |
903 | /// to update the access time of all assets present in the scene or referenced by assets | 903 | /// to update the access time of all assets present in the scene or referenced by assets |
904 | /// in the scene. | 904 | /// in the scene. |
905 | /// </summary> | 905 | /// </summary> |
@@ -918,7 +918,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
918 | StampRegionStatusFile(s.RegionInfo.RegionID); | 918 | StampRegionStatusFile(s.RegionInfo.RegionID); |
919 | 919 | ||
920 | s.ForEachSOG(delegate(SceneObjectGroup e) | 920 | s.ForEachSOG(delegate(SceneObjectGroup e) |
921 | { | 921 | { |
922 | if(!m_timerRunning && !storeUncached) | 922 | if(!m_timerRunning && !storeUncached) |
923 | return; | 923 | return; |
924 | 924 | ||
@@ -1012,7 +1012,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
1012 | 1012 | ||
1013 | double weakHitRate = m_weakRefHits * invReq; | 1013 | double weakHitRate = m_weakRefHits * invReq; |
1014 | int weakEntries = weakAssetReferences.Count; | 1014 | int weakEntries = weakAssetReferences.Count; |
1015 | 1015 | ||
1016 | double fileHitRate = m_DiskHits * invReq; | 1016 | double fileHitRate = m_DiskHits * invReq; |
1017 | double TotalHitRate = weakHitRate + fileHitRate; | 1017 | double TotalHitRate = weakHitRate + fileHitRate; |
1018 | 1018 | ||
@@ -1073,9 +1073,9 @@ namespace OpenSim.Region.CoreModules.Asset | |||
1073 | if (m_FileCacheEnabled) | 1073 | if (m_FileCacheEnabled) |
1074 | { | 1074 | { |
1075 | con.Output("Deep scans have previously been performed on the following regions:"); | 1075 | con.Output("Deep scans have previously been performed on the following regions:"); |
1076 | 1076 | ||
1077 | foreach (string s in Directory.GetFiles(m_CacheDirectory, "*.fac")) | 1077 | foreach (string s in Directory.GetFiles(m_CacheDirectory, "*.fac")) |
1078 | { | 1078 | { |
1079 | string RegionID = s.Remove(0,s.IndexOf("_")).Replace(".fac",""); | 1079 | string RegionID = s.Remove(0,s.IndexOf("_")).Replace(".fac",""); |
1080 | DateTime RegionDeepScanTMStamp = File.GetLastWriteTime(s); | 1080 | DateTime RegionDeepScanTMStamp = File.GetLastWriteTime(s); |
1081 | con.OutputFormat("Region: {0}, {1}", RegionID, RegionDeepScanTMStamp.ToString("MM/dd/yyyy hh:mm:ss")); | 1081 | con.OutputFormat("Region: {0}, {1}", RegionID, RegionDeepScanTMStamp.ToString("MM/dd/yyyy hh:mm:ss")); |
@@ -1118,7 +1118,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
1118 | con.Output("Memory cache not enabled."); | 1118 | con.Output("Memory cache not enabled."); |
1119 | } | 1119 | } |
1120 | } | 1120 | } |
1121 | 1121 | ||
1122 | if (clearFile) | 1122 | if (clearFile) |
1123 | { | 1123 | { |
1124 | if (m_FileCacheEnabled) | 1124 | if (m_FileCacheEnabled) |
@@ -1147,7 +1147,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
1147 | 1147 | ||
1148 | con.Output("FloatSam Ensuring assets are cached for all scenes."); | 1148 | con.Output("FloatSam Ensuring assets are cached for all scenes."); |
1149 | 1149 | ||
1150 | WorkManager.RunInThread(delegate | 1150 | WorkManager.RunInThread(delegate |
1151 | { | 1151 | { |
1152 | bool wasRunning= false; | 1152 | bool wasRunning= false; |
1153 | lock(timerLock) | 1153 | lock(timerLock) |
@@ -1167,7 +1167,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
1167 | if(wasRunning) | 1167 | if(wasRunning) |
1168 | { | 1168 | { |
1169 | m_CacheCleanTimer.Start(); | 1169 | m_CacheCleanTimer.Start(); |
1170 | m_timerRunning = true; | 1170 | m_timerRunning = true; |
1171 | } | 1171 | } |
1172 | m_cleanupRunning = false; | 1172 | m_cleanupRunning = false; |
1173 | } | 1173 | } |
@@ -1247,12 +1247,12 @@ namespace OpenSim.Region.CoreModules.Asset | |||
1247 | public bool[] AssetsExist(string[] ids) | 1247 | public bool[] AssetsExist(string[] ids) |
1248 | { | 1248 | { |
1249 | bool[] exist = new bool[ids.Length]; | 1249 | bool[] exist = new bool[ids.Length]; |
1250 | 1250 | ||
1251 | for (int i = 0; i < ids.Length; i++) | 1251 | for (int i = 0; i < ids.Length; i++) |
1252 | { | 1252 | { |
1253 | exist[i] = Check(ids[i]); | 1253 | exist[i] = Check(ids[i]); |
1254 | } | 1254 | } |
1255 | 1255 | ||
1256 | return exist; | 1256 | return exist; |
1257 | } | 1257 | } |
1258 | 1258 | ||
diff --git a/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs b/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs index 195bdaa..208963d 100644 --- a/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
55 | // Instrumentation | 55 | // Instrumentation |
56 | private uint m_DebugRate; | 56 | private uint m_DebugRate; |
57 | 57 | ||
58 | public Type ReplaceableInterface | 58 | public Type ReplaceableInterface |
59 | { | 59 | { |
60 | get { return null; } | 60 | get { return null; } |
61 | } | 61 | } |
diff --git a/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs b/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs index 73e4431..dbb7941 100644 --- a/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs +++ b/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs | |||
@@ -112,7 +112,7 @@ namespace OpenSim.Region.CoreModules.Asset.Tests | |||
112 | { | 112 | { |
113 | TestHelpers.InMethod(); | 113 | TestHelpers.InMethod(); |
114 | // log4net.Config.XmlConfigurator.Configure(); | 114 | // log4net.Config.XmlConfigurator.Configure(); |
115 | 115 | ||
116 | AssetBase asset = AssetHelpers.CreateNotecardAsset(); | 116 | AssetBase asset = AssetHelpers.CreateNotecardAsset(); |
117 | asset.ID = TestHelpers.ParseTail(0x2).ToString(); | 117 | asset.ID = TestHelpers.ParseTail(0x2).ToString(); |
118 | 118 | ||