aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTom2011-01-26 17:06:17 -0800
committerTom2011-01-26 17:06:17 -0800
commit31fb448cfc9c43532c38a58fff75fb6c0e67d632 (patch)
tree12d0eb44be349690a7f5ceab3e4e7784b4c0b221
parentAdd a "useCached" parameter to GetUserAccount. Add a function to Scene to get... (diff)
downloadopensim-SC_OLD-31fb448cfc9c43532c38a58fff75fb6c0e67d632.zip
opensim-SC_OLD-31fb448cfc9c43532c38a58fff75fb6c0e67d632.tar.gz
opensim-SC_OLD-31fb448cfc9c43532c38a58fff75fb6c0e67d632.tar.bz2
opensim-SC_OLD-31fb448cfc9c43532c38a58fff75fb6c0e67d632.tar.xz
Mostly revert the last commit with the aim of searching for a better solution
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs17
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs5
-rw-r--r--OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs5
-rw-r--r--OpenSim/Services/HypergridService/UserAccountCache.cs5
-rw-r--r--OpenSim/Services/Interfaces/IUserAccountService.cs1
-rw-r--r--OpenSim/Services/UserAccountService/UserAccountService.cs5
7 files changed, 5 insertions, 35 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
index 54340e6..9ecbcc6 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
@@ -142,19 +142,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
142 142
143 public UserAccount GetUserAccount(UUID scopeID, UUID userID) 143 public UserAccount GetUserAccount(UUID scopeID, UUID userID)
144 { 144 {
145 return GetUserAccount(scopeID, userID, true); 145 bool inCache = false;
146 } 146 UserAccount account = m_Cache.Get(userID, out inCache);
147 147 if (inCache)
148 public UserAccount GetUserAccount(UUID scopeID, UUID userID, bool useCache) 148 return account;
149 {
150 UserAccount account;
151 if (useCache)
152 {
153 bool inCache = false;
154 account = m_Cache.Get(userID, out inCache);
155 if (inCache)
156 return account;
157 }
158 149
159 account = m_UserService.GetUserAccount(scopeID, userID); 150 account = m_UserService.GetUserAccount(scopeID, userID);
160 m_Cache.Cache(userID, account); 151 m_Cache.Cache(userID, account);
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 99248c1..236e9c1 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2559,7 +2559,7 @@ namespace OpenSim.Region.Framework.Scenes
2559 else 2559 else
2560 { 2560 {
2561 */ 2561 */
2562 UserAccount uac = UserAccountService.GetUserAccount(RegionInfo.ScopeID, user, false); 2562 UserAccount uac = UserAccountService.GetUserAccount(RegionInfo.ScopeID, user);
2563 return uac.UserFlags; 2563 return uac.UserFlags;
2564 //} 2564 //}
2565 } 2565 }
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
index fe4e2bf..801b424 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
@@ -131,11 +131,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
131 131
132 public UserAccount GetUserAccount(UUID scopeID, UUID userID) 132 public UserAccount GetUserAccount(UUID scopeID, UUID userID)
133 { 133 {
134 return GetUserAccount(scopeID, userID, true);
135 }
136
137 public UserAccount GetUserAccount(UUID scopeID, UUID userID, bool useCache)
138 {
139 // Cache check 134 // Cache check
140 UserAccount account; 135 UserAccount account;
141 if (m_accountCache.TryGetValue(userID, out account)) 136 if (m_accountCache.TryGetValue(userID, out account))
diff --git a/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs b/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs
index c21b250..205a4aa 100644
--- a/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs
+++ b/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs
@@ -113,11 +113,6 @@ namespace OpenSim.Services.Connectors
113 113
114 public virtual UserAccount GetUserAccount(UUID scopeID, UUID userID) 114 public virtual UserAccount GetUserAccount(UUID scopeID, UUID userID)
115 { 115 {
116 return GetUserAccount(scopeID, userID, true);
117 }
118
119 public virtual UserAccount GetUserAccount(UUID scopeID, UUID userID, bool useCache)
120 {
121 //m_log.DebugFormat("[ACCOUNTS CONNECTOR]: GetUserAccount {0}", userID); 116 //m_log.DebugFormat("[ACCOUNTS CONNECTOR]: GetUserAccount {0}", userID);
122 Dictionary<string, object> sendData = new Dictionary<string, object>(); 117 Dictionary<string, object> sendData = new Dictionary<string, object>();
123 //sendData["SCOPEID"] = scopeID.ToString(); 118 //sendData["SCOPEID"] = scopeID.ToString();
diff --git a/OpenSim/Services/HypergridService/UserAccountCache.cs b/OpenSim/Services/HypergridService/UserAccountCache.cs
index bbc531e..e0a3e61 100644
--- a/OpenSim/Services/HypergridService/UserAccountCache.cs
+++ b/OpenSim/Services/HypergridService/UserAccountCache.cs
@@ -80,11 +80,6 @@ namespace OpenSim.Services.HypergridService
80 return GetUser(userID.ToString()); 80 return GetUser(userID.ToString());
81 } 81 }
82 82
83 public UserAccount GetUserAccount(UUID scopeID, UUID userID, bool useCache)
84 {
85 return GetUser(userID.ToString());
86 }
87
88 public UserAccount GetUserAccount(UUID scopeID, string FirstName, string LastName) 83 public UserAccount GetUserAccount(UUID scopeID, string FirstName, string LastName)
89 { 84 {
90 return null; 85 return null;
diff --git a/OpenSim/Services/Interfaces/IUserAccountService.cs b/OpenSim/Services/Interfaces/IUserAccountService.cs
index 21be98c..a91aa0f 100644
--- a/OpenSim/Services/Interfaces/IUserAccountService.cs
+++ b/OpenSim/Services/Interfaces/IUserAccountService.cs
@@ -143,7 +143,6 @@ namespace OpenSim.Services.Interfaces
143 143
144 public interface IUserAccountService 144 public interface IUserAccountService
145 { 145 {
146 UserAccount GetUserAccount(UUID scopeID, UUID userID, bool useCache);
147 UserAccount GetUserAccount(UUID scopeID, UUID userID); 146 UserAccount GetUserAccount(UUID scopeID, UUID userID);
148 UserAccount GetUserAccount(UUID scopeID, string FirstName, string LastName); 147 UserAccount GetUserAccount(UUID scopeID, string FirstName, string LastName);
149 UserAccount GetUserAccount(UUID scopeID, string Email); 148 UserAccount GetUserAccount(UUID scopeID, string Email);
diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs
index b914668..cbd6f35 100644
--- a/OpenSim/Services/UserAccountService/UserAccountService.cs
+++ b/OpenSim/Services/UserAccountService/UserAccountService.cs
@@ -208,11 +208,6 @@ namespace OpenSim.Services.UserAccountService
208 208
209 public UserAccount GetUserAccount(UUID scopeID, UUID principalID) 209 public UserAccount GetUserAccount(UUID scopeID, UUID principalID)
210 { 210 {
211 return GetUserAccount(scopeID, principalID, true);
212 }
213
214 public UserAccount GetUserAccount(UUID scopeID, UUID principalID, bool useCache)
215 {
216 UserAccountData[] d; 211 UserAccountData[] d;
217 212
218 if (scopeID != UUID.Zero) 213 if (scopeID != UUID.Zero)