aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache
diff options
context:
space:
mode:
authorJeff Ames2008-08-18 00:39:10 +0000
committerJeff Ames2008-08-18 00:39:10 +0000
commit6ef9d4da901a346c232458317cca6268da888e2e (patch)
treedd1d935b10f34f261839da9f9879c02322e8ede7 /OpenSim/Framework/Communications/Cache
parentUpdate svn properties, minor formatting cleanup. (diff)
downloadopensim-SC_OLD-6ef9d4da901a346c232458317cca6268da888e2e.zip
opensim-SC_OLD-6ef9d4da901a346c232458317cca6268da888e2e.tar.gz
opensim-SC_OLD-6ef9d4da901a346c232458317cca6268da888e2e.tar.bz2
opensim-SC_OLD-6ef9d4da901a346c232458317cca6268da888e2e.tar.xz
Formatting cleanup.
Diffstat (limited to 'OpenSim/Framework/Communications/Cache')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs14
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetServerBase.cs10
-rw-r--r--OpenSim/Framework/Communications/Cache/CachedUserInfo.cs6
-rw-r--r--OpenSim/Framework/Communications/Cache/GridAssetClient.cs2
-rw-r--r--OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs34
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs2
6 files changed, 34 insertions, 34 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index 6eff690..e924b3f 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -143,10 +143,10 @@ namespace OpenSim.Framework.Communications.Cache
143 public void Clear() 143 public void Clear()
144 { 144 {
145 m_log.Info("[ASSET CACHE]: Clearing Asset cache"); 145 m_log.Info("[ASSET CACHE]: Clearing Asset cache");
146 146
147 if (StatsManager.SimExtraStats != null) 147 if (StatsManager.SimExtraStats != null)
148 StatsManager.SimExtraStats.ClearAssetCacheStatistics(); 148 StatsManager.SimExtraStats.ClearAssetCacheStatistics();
149 149
150 Initialize(); 150 Initialize();
151 } 151 }
152 152
@@ -365,9 +365,9 @@ namespace OpenSim.Framework.Communications.Cache
365 } 365 }
366 } 366 }
367 else 367 else
368 { 368 {
369 if (!Assets.ContainsKey(asset.FullID)) 369 if (!Assets.ContainsKey(asset.FullID))
370 { 370 {
371 AssetInfo assetInf = new AssetInfo(asset); 371 AssetInfo assetInf = new AssetInfo(asset);
372 Assets.Add(assetInf.FullID, assetInf); 372 Assets.Add(assetInf.FullID, assetInf);
373 373
@@ -382,7 +382,7 @@ namespace OpenSim.Framework.Communications.Cache
382 } 382 }
383 } 383 }
384 384
385 /// <summary> 385 /// <summary>
386 /// Allows you to clear a specific asset by uuid out 386 /// Allows you to clear a specific asset by uuid out
387 /// of the asset cache. This is needed because the osdynamic 387 /// of the asset cache. This is needed because the osdynamic
388 /// texture code grows the asset cache without bounds. The 388 /// texture code grows the asset cache without bounds. The
@@ -399,8 +399,8 @@ namespace OpenSim.Framework.Communications.Cache
399 if (Textures.ContainsKey(uuid)) 399 if (Textures.ContainsKey(uuid))
400 { 400 {
401 Textures.Remove(uuid); 401 Textures.Remove(uuid);
402 } 402 }
403 else if (Assets.ContainsKey(uuid)) 403 else if (Assets.ContainsKey(uuid))
404 { 404 {
405 Assets.Remove(uuid); 405 Assets.Remove(uuid);
406 } 406 }
diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
index ed5b896..2c8e685 100644
--- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Framework.Communications.Cache
57 /// <param name="req"></param> 57 /// <param name="req"></param>
58 /// <returns></returns> 58 /// <returns></returns>
59 /// <exception cref="System.Exception"> 59 /// <exception cref="System.Exception">
60 /// Thrown if the request failed for some other reason than that the 60 /// Thrown if the request failed for some other reason than that the
61 /// asset cannot be found. 61 /// asset cannot be found.
62 /// </exception> 62 /// </exception>
63 protected abstract AssetBase GetAsset(AssetRequest req); 63 protected abstract AssetBase GetAsset(AssetRequest req);
@@ -70,7 +70,7 @@ namespace OpenSim.Framework.Communications.Cache
70 protected virtual void ProcessRequest(AssetRequest req) 70 protected virtual void ProcessRequest(AssetRequest req)
71 { 71 {
72 AssetBase asset; 72 AssetBase asset;
73 73
74 try 74 try
75 { 75 {
76 asset = GetAsset(req); 76 asset = GetAsset(req);
@@ -78,12 +78,12 @@ namespace OpenSim.Framework.Communications.Cache
78 catch (Exception e) 78 catch (Exception e)
79 { 79 {
80 m_log.ErrorFormat("[ASSET]: Asset request for {0} threw exception {1}", req.AssetID, e); 80 m_log.ErrorFormat("[ASSET]: Asset request for {0} threw exception {1}", req.AssetID, e);
81 81
82 if (StatsManager.SimExtraStats != null) 82 if (StatsManager.SimExtraStats != null)
83 StatsManager.SimExtraStats.AddAssetServiceRequestFailure(); 83 StatsManager.SimExtraStats.AddAssetServiceRequestFailure();
84 84
85 m_receiver.AssetNotFound(req.AssetID, req.IsTexture); 85 m_receiver.AssetNotFound(req.AssetID, req.IsTexture);
86 86
87 return; 87 return;
88 } 88 }
89 89
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index 57f5e76..c337907 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -91,8 +91,8 @@ namespace OpenSim.Framework.Communications.Cache
91 get { return m_session_id; } 91 get { return m_session_id; }
92 set { m_session_id = value; } 92 set { m_session_id = value; }
93 } 93 }
94 private LLUUID m_session_id = LLUUID.Zero; 94 private LLUUID m_session_id = LLUUID.Zero;
95 95
96 /// <summary> 96 /// <summary>
97 /// Constructor 97 /// Constructor
98 /// </summary> 98 /// </summary>
@@ -172,7 +172,7 @@ namespace OpenSim.Framework.Communications.Cache
172 } 172 }
173 } 173 }
174 } 174 }
175 175
176 /// <summary> 176 /// <summary>
177 /// Drop all cached inventory. 177 /// Drop all cached inventory.
178 /// </summary> 178 /// </summary>
diff --git a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
index 4206cae..9cccf66 100644
--- a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
+++ b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
@@ -60,7 +60,7 @@ namespace OpenSim.Framework.Communications.Cache
60 rc.AddQueryParameter("texture"); 60 rc.AddQueryParameter("texture");
61 61
62 rc.RequestMethod = "GET"; 62 rc.RequestMethod = "GET";
63 63
64 Stream s = rc.Request(); 64 Stream s = rc.Request();
65 65
66 if (s.Length > 0) 66 if (s.Length > 0)
diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
index d7de9d6..61cfc1a 100644
--- a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
+++ b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
@@ -37,19 +37,19 @@ namespace OpenSim.Framework.Communications.Cache
37 public class InventoryFolderImpl : InventoryFolderBase 37 public class InventoryFolderImpl : InventoryFolderBase
38 { 38 {
39 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 39 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
40 40
41 public static readonly string PATH_DELIMITER = "/"; 41 public static readonly string PATH_DELIMITER = "/";
42 42
43 /// <summary> 43 /// <summary>
44 /// Items that are contained in this folder 44 /// Items that are contained in this folder
45 /// </summary> 45 /// </summary>
46 public Dictionary<LLUUID, InventoryItemBase> Items = new Dictionary<LLUUID, InventoryItemBase>(); 46 public Dictionary<LLUUID, InventoryItemBase> Items = new Dictionary<LLUUID, InventoryItemBase>();
47 47
48 /// <summary> 48 /// <summary>
49 /// Child folders that are contained in this folder 49 /// Child folders that are contained in this folder
50 /// </summary> 50 /// </summary>
51 public Dictionary<LLUUID, InventoryFolderImpl> SubFolders = new Dictionary<LLUUID, InventoryFolderImpl>(); 51 public Dictionary<LLUUID, InventoryFolderImpl> SubFolders = new Dictionary<LLUUID, InventoryFolderImpl>();
52 52
53 // Constructors 53 // Constructors
54 public InventoryFolderImpl(InventoryFolderBase folderbase) 54 public InventoryFolderImpl(InventoryFolderBase folderbase)
55 { 55 {
@@ -195,15 +195,15 @@ namespace OpenSim.Framework.Communications.Cache
195 195
196 return null; 196 return null;
197 } 197 }
198 198
199 /// <summary> 199 /// <summary>
200 /// Find a folder given a PATH_DELIMITOR delimited path starting from this folder 200 /// Find a folder given a PATH_DELIMITOR delimited path starting from this folder
201 /// 201 ///
202 /// This method does not handle paths that contain multiple delimitors 202 /// This method does not handle paths that contain multiple delimitors
203 /// 203 ///
204 /// FIXME: We do not yet handle situations where folders have the same name. We could handle this by some 204 /// FIXME: We do not yet handle situations where folders have the same name. We could handle this by some
205 /// XPath like expression 205 /// XPath like expression
206 /// 206 ///
207 /// FIXME: Delimitors which occur in names themselves are not currently escapable. 207 /// FIXME: Delimitors which occur in names themselves are not currently escapable.
208 /// </summary> 208 /// </summary>
209 /// <param name="path"> 209 /// <param name="path">
@@ -214,7 +214,7 @@ namespace OpenSim.Framework.Communications.Cache
214 { 214 {
215 if (path == string.Empty) 215 if (path == string.Empty)
216 return this; 216 return this;
217 217
218 string[] components = path.Split(new string[] { PATH_DELIMITER }, 2, StringSplitOptions.None); 218 string[] components = path.Split(new string[] { PATH_DELIMITER }, 2, StringSplitOptions.None);
219 219
220 lock (SubFolders) 220 lock (SubFolders)
@@ -228,19 +228,19 @@ namespace OpenSim.Framework.Communications.Cache
228 return folder; 228 return folder;
229 } 229 }
230 } 230 }
231 231
232 // We didn't find a folder with the given name 232 // We didn't find a folder with the given name
233 return null; 233 return null;
234 } 234 }
235 235
236 /// <summary> 236 /// <summary>
237 /// Find an item given a PATH_DELIMITOR delimited path starting from this folder. 237 /// Find an item given a PATH_DELIMITOR delimited path starting from this folder.
238 /// 238 ///
239 /// This method does not handle paths that contain multiple delimitors 239 /// This method does not handle paths that contain multiple delimitors
240 /// 240 ///
241 /// FIXME: We do not yet handle situations where folders or items have the same name. We could handle this by some 241 /// FIXME: We do not yet handle situations where folders or items have the same name. We could handle this by some
242 /// XPath like expression 242 /// XPath like expression
243 /// 243 ///
244 /// FIXME: Delimitors which occur in names themselves are not currently escapable. 244 /// FIXME: Delimitors which occur in names themselves are not currently escapable.
245 /// </summary> 245 /// </summary>
246 /// <param name="path"> 246 /// <param name="path">
@@ -248,7 +248,7 @@ namespace OpenSim.Framework.Communications.Cache
248 /// </param> 248 /// </param>
249 /// <returns>null if the item is not found</returns> 249 /// <returns>null if the item is not found</returns>
250 public InventoryItemBase FindItemByPath(string path) 250 public InventoryItemBase FindItemByPath(string path)
251 { 251 {
252 string[] components = path.Split(new string[] { PATH_DELIMITER }, 2, StringSplitOptions.None); 252 string[] components = path.Split(new string[] { PATH_DELIMITER }, 2, StringSplitOptions.None);
253 253
254 if (components.Length == 1) 254 if (components.Length == 1)
@@ -263,7 +263,7 @@ namespace OpenSim.Framework.Communications.Cache
263 } 263 }
264 } 264 }
265 else 265 else
266 { 266 {
267 lock (SubFolders) 267 lock (SubFolders)
268 { 268 {
269 foreach (InventoryFolderImpl folder in SubFolders.Values) 269 foreach (InventoryFolderImpl folder in SubFolders.Values)
@@ -273,10 +273,10 @@ namespace OpenSim.Framework.Communications.Cache
273 } 273 }
274 } 274 }
275 } 275 }
276 276
277 // We didn't find an item or intermediate folder with the given name 277 // We didn't find an item or intermediate folder with the given name
278 return null; 278 return null;
279 } 279 }
280 280
281 /// <summary> 281 /// <summary>
282 /// Return a copy of the list of child items in this folder 282 /// Return a copy of the list of child items in this folder
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index 1360aa3..4e3840b 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -90,7 +90,7 @@ namespace OpenSim.Framework.Communications.Cache
90 90
91 m_log.WarnFormat( 91 m_log.WarnFormat(
92 "[USER CACHE]: Tried to remove the profile of user {0}, but this was not in the scene", userId); 92 "[USER CACHE]: Tried to remove the profile of user {0}, but this was not in the scene", userId);
93 93
94 return false; 94 return false;
95 } 95 }
96 96