diff options
author | Jeff Ames | 2009-10-01 01:00:09 +0900 |
---|---|---|
committer | Jeff Ames | 2009-10-01 01:17:47 +0900 |
commit | ee205e7e812e170f670e690a4e0fa9caa652f226 (patch) | |
tree | df407e66d9aa47a884e39d5d86b877d6ef468a1a /OpenSim/Framework/Communications/Cache | |
parent | adding LandDataSerializer (not connected anywhere, work-in-progress) (diff) | |
download | opensim-SC-ee205e7e812e170f670e690a4e0fa9caa652f226.zip opensim-SC-ee205e7e812e170f670e690a4e0fa9caa652f226.tar.gz opensim-SC-ee205e7e812e170f670e690a4e0fa9caa652f226.tar.bz2 opensim-SC-ee205e7e812e170f670e690a4e0fa9caa652f226.tar.xz |
Formatting cleanup.
Diffstat (limited to 'OpenSim/Framework/Communications/Cache')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | 8 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | 34 |
2 files changed, 21 insertions, 21 deletions
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index 238810a..8c39ca8 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
55 | /// Stores user profile and inventory data received from backend services for a particular user. | 55 | /// Stores user profile and inventory data received from backend services for a particular user. |
56 | /// </summary> | 56 | /// </summary> |
57 | public class CachedUserInfo | 57 | public class CachedUserInfo |
58 | { | 58 | { |
59 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 59 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
60 | 60 | ||
61 | //// <value> | 61 | //// <value> |
@@ -190,7 +190,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
190 | resolvedFolders.Add(folder); | 190 | resolvedFolders.Add(folder); |
191 | resolvedFolderDictionary[folder.ID] = folder; | 191 | resolvedFolderDictionary[folder.ID] = folder; |
192 | parentFolder.AddChildFolder(folder); | 192 | parentFolder.AddChildFolder(folder); |
193 | } | 193 | } |
194 | } | 194 | } |
195 | } // foreach (folder in pendingCategorizationFolders[parentFolder.ID]) | 195 | } // foreach (folder in pendingCategorizationFolders[parentFolder.ID]) |
196 | 196 | ||
@@ -422,7 +422,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
422 | /// | 422 | /// |
423 | /// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE | 423 | /// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE |
424 | /// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing, | 424 | /// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing, |
425 | /// and needs to be changed. | 425 | /// and needs to be changed. |
426 | /// | 426 | /// |
427 | /// <param name="folderID"></param> | 427 | /// <param name="folderID"></param> |
428 | /// <param name="type"></param> | 428 | /// <param name="type"></param> |
@@ -500,7 +500,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
500 | InventoryFolderImpl oldParentFolder = RootFolder.FindFolder(folder.ParentID); | 500 | InventoryFolderImpl oldParentFolder = RootFolder.FindFolder(folder.ParentID); |
501 | 501 | ||
502 | if (oldParentFolder != null) | 502 | if (oldParentFolder != null) |
503 | { | 503 | { |
504 | oldParentFolder.RemoveChildFolder(folderID); | 504 | oldParentFolder.RemoveChildFolder(folderID); |
505 | parentFolder.AddChildFolder(folder); | 505 | parentFolder.AddChildFolder(folder); |
506 | } | 506 | } |
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 7f1c7e9..2a1da50 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | |||
@@ -60,7 +60,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
60 | /// User profiles indexed by name | 60 | /// User profiles indexed by name |
61 | /// </summary> | 61 | /// </summary> |
62 | private readonly Dictionary<string, CachedUserInfo> m_userProfilesByName | 62 | private readonly Dictionary<string, CachedUserInfo> m_userProfilesByName |
63 | = new Dictionary<string, CachedUserInfo>(); | 63 | = new Dictionary<string, CachedUserInfo>(); |
64 | 64 | ||
65 | /// <summary> | 65 | /// <summary> |
66 | /// The root library folder. | 66 | /// The root library folder. |
@@ -125,26 +125,26 @@ namespace OpenSim.Framework.Communications.Cache | |||
125 | /// </summary> | 125 | /// </summary> |
126 | /// If the user isn't in cache then the user is requested from the profile service. | 126 | /// If the user isn't in cache then the user is requested from the profile service. |
127 | /// <param name="userID"></param> | 127 | /// <param name="userID"></param> |
128 | /// <returns>null if no user details are found</returns> | 128 | /// <returns>null if no user details are found</returns> |
129 | public CachedUserInfo GetUserDetails(string fname, string lname) | 129 | public CachedUserInfo GetUserDetails(string fname, string lname) |
130 | { | 130 | { |
131 | lock (m_userProfilesByName) | 131 | lock (m_userProfilesByName) |
132 | { | 132 | { |
133 | CachedUserInfo userInfo; | 133 | CachedUserInfo userInfo; |
134 | 134 | ||
135 | if (m_userProfilesByName.TryGetValue(string.Format(NAME_FORMAT, fname, lname), out userInfo)) | 135 | if (m_userProfilesByName.TryGetValue(string.Format(NAME_FORMAT, fname, lname), out userInfo)) |
136 | { | 136 | { |
137 | return userInfo; | 137 | return userInfo; |
138 | } | 138 | } |
139 | else | 139 | else |
140 | { | 140 | { |
141 | UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(fname, lname); | 141 | UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(fname, lname); |
142 | 142 | ||
143 | if (userProfile != null) | 143 | if (userProfile != null) |
144 | return AddToCaches(userProfile); | 144 | return AddToCaches(userProfile); |
145 | else | 145 | else |
146 | return null; | 146 | return null; |
147 | } | 147 | } |
148 | } | 148 | } |
149 | } | 149 | } |
150 | 150 | ||
@@ -185,20 +185,20 @@ namespace OpenSim.Framework.Communications.Cache | |||
185 | // probably by making sure that the update doesn't use the UserCacheInfo.UserProfile directly (possibly via | 185 | // probably by making sure that the update doesn't use the UserCacheInfo.UserProfile directly (possibly via |
186 | // returning a read only class from the cache). | 186 | // returning a read only class from the cache). |
187 | // public bool StoreProfile(UserProfileData userProfile) | 187 | // public bool StoreProfile(UserProfileData userProfile) |
188 | // { | 188 | // { |
189 | // lock (m_userProfilesById) | 189 | // lock (m_userProfilesById) |
190 | // { | 190 | // { |
191 | // CachedUserInfo userInfo = GetUserDetails(userProfile.ID); | 191 | // CachedUserInfo userInfo = GetUserDetails(userProfile.ID); |
192 | // | 192 | // |
193 | // if (userInfo != null) | 193 | // if (userInfo != null) |
194 | // { | 194 | // { |
195 | // userInfo.m_userProfile = userProfile; | 195 | // userInfo.m_userProfile = userProfile; |
196 | // m_commsManager.UserService.UpdateUserProfile(userProfile); | 196 | // m_commsManager.UserService.UpdateUserProfile(userProfile); |
197 | // | 197 | // |
198 | // return true; | 198 | // return true; |
199 | // } | 199 | // } |
200 | // } | 200 | // } |
201 | // | 201 | // |
202 | // return false; | 202 | // return false; |
203 | // } | 203 | // } |
204 | 204 | ||
@@ -220,7 +220,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
220 | } | 220 | } |
221 | } | 221 | } |
222 | 222 | ||
223 | return createdUserInfo; | 223 | return createdUserInfo; |
224 | } | 224 | } |
225 | 225 | ||
226 | /// <summary> | 226 | /// <summary> |
@@ -234,7 +234,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
234 | { | 234 | { |
235 | if (m_userProfilesById.ContainsKey(userId)) | 235 | if (m_userProfilesById.ContainsKey(userId)) |
236 | { | 236 | { |
237 | CachedUserInfo userInfo = m_userProfilesById[userId]; | 237 | CachedUserInfo userInfo = m_userProfilesById[userId]; |
238 | m_userProfilesById.Remove(userId); | 238 | m_userProfilesById.Remove(userId); |
239 | 239 | ||
240 | lock (m_userProfilesByName) | 240 | lock (m_userProfilesByName) |
@@ -244,7 +244,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
244 | 244 | ||
245 | return true; | 245 | return true; |
246 | } | 246 | } |
247 | } | 247 | } |
248 | 248 | ||
249 | return false; | 249 | return false; |
250 | } | 250 | } |