aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache
diff options
context:
space:
mode:
authorMW2007-10-29 21:46:25 +0000
committerMW2007-10-29 21:46:25 +0000
commit3d8219f6c7faa256d6a13ab7925f75d83af95b78 (patch)
treeea507efa88aa7e526575469a6ce913fdc0c0358e /OpenSim/Framework/Communications/Cache
parentFixed a bug in SQLAssetServer that only seemed to be a problem when running u... (diff)
downloadopensim-SC_OLD-3d8219f6c7faa256d6a13ab7925f75d83af95b78.zip
opensim-SC_OLD-3d8219f6c7faa256d6a13ab7925f75d83af95b78.tar.gz
opensim-SC_OLD-3d8219f6c7faa256d6a13ab7925f75d83af95b78.tar.bz2
opensim-SC_OLD-3d8219f6c7faa256d6a13ab7925f75d83af95b78.tar.xz
as per the "Filesystem cleanup for OpenSim repository" mailing list thread. Have flattened the OpenSim.Framework project/namespace. The problem is that the namespace is still wrong as its "OpenSim.Framework" while the directory is "OpenSim\Framework\General" , so we need to decide if we change the directory or correct the namespace.
Note this has lead to a big flat project, but I think a lot of the files we most likely don't even use any longer. And others belong in other projects/namespaces anyway.
Diffstat (limited to 'OpenSim/Framework/Communications/Cache')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs3
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetServer.cs3
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetServerBase.cs32
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs3
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetTransactions.cs3
-rw-r--r--OpenSim/Framework/Communications/Cache/CachedUserInfo.cs2
-rw-r--r--OpenSim/Framework/Communications/Cache/GridAssetClient.cs3
-rw-r--r--OpenSim/Framework/Communications/Cache/InventoryFolder.cs3
-rw-r--r--OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs3
-rw-r--r--OpenSim/Framework/Communications/Cache/SQLAssetServer.cs5
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCache.cs4
11 files changed, 27 insertions, 37 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index 1f5b336..39e2887 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -34,8 +34,7 @@ using System.Threading;
34using libsecondlife; 34using libsecondlife;
35using libsecondlife.Packets; 35using libsecondlife.Packets;
36using OpenSim.Framework.Interfaces; 36using OpenSim.Framework.Interfaces;
37using OpenSim.Framework.Types; 37using OpenSim.Framework;
38using OpenSim.Framework.Utilities;
39using OpenSim.Framework.Console; 38using OpenSim.Framework.Console;
40 39
41namespace OpenSim.Framework.Communications.Cache 40namespace OpenSim.Framework.Communications.Cache
diff --git a/OpenSim/Framework/Communications/Cache/AssetServer.cs b/OpenSim/Framework/Communications/Cache/AssetServer.cs
index aebda00..c927571 100644
--- a/OpenSim/Framework/Communications/Cache/AssetServer.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetServer.cs
@@ -36,8 +36,7 @@ using Nini.Config;
36using OpenSim.Framework.Communications.Cache; 36using OpenSim.Framework.Communications.Cache;
37using OpenSim.Framework.Console; 37using OpenSim.Framework.Console;
38using OpenSim.Framework.Interfaces; 38using OpenSim.Framework.Interfaces;
39using OpenSim.Framework.Types; 39using OpenSim.Framework;
40using OpenSim.Framework.Utilities;
41 40
42namespace OpenSim.Framework.Communications.Cache 41namespace OpenSim.Framework.Communications.Cache
43{ 42{
diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
index dc9c1ad..0771a20 100644
--- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
@@ -6,8 +6,7 @@ using libsecondlife;
6using Nini.Config; 6using Nini.Config;
7using OpenSim.Framework.Console; 7using OpenSim.Framework.Console;
8using OpenSim.Framework.Interfaces; 8using OpenSim.Framework.Interfaces;
9using OpenSim.Framework.Types; 9using OpenSim.Framework;
10using OpenSim.Framework.Utilities;
11 10
12namespace OpenSim.Framework.Communications.Cache 11namespace OpenSim.Framework.Communications.Cache
13{ 12{
@@ -18,18 +17,18 @@ namespace OpenSim.Framework.Communications.Cache
18 protected Thread _localAssetServerThread; 17 protected Thread _localAssetServerThread;
19 protected IAssetProvider m_assetProviderPlugin; 18 protected IAssetProvider m_assetProviderPlugin;
20 protected object syncLock = new object(); 19 protected object syncLock = new object();
21 20
22 protected abstract void StoreAsset(AssetBase asset); 21 protected abstract void StoreAsset(AssetBase asset);
23 protected abstract void CommitAssets(); 22 protected abstract void CommitAssets();
24 23
25 protected abstract void RunRequests(); 24 protected abstract void RunRequests();
26 25
27 public void LoadDefaultAssets() 26 public void LoadDefaultAssets()
28 { 27 {
29 MainLog.Instance.Verbose("SQL ASSET SERVER", "Setting up asset database"); 28 MainLog.Instance.Verbose("SQL ASSET SERVER", "Setting up asset database");
30 29
31 ForEachDefaultAsset(StoreAsset ); 30 ForEachDefaultAsset(StoreAsset);
32 ForEachXmlAsset(StoreAsset ); 31 ForEachXmlAsset(StoreAsset);
33 32
34 CommitAssets(); 33 CommitAssets();
35 } 34 }
@@ -37,10 +36,11 @@ namespace OpenSim.Framework.Communications.Cache
37 36
38 public AssetServerBase() 37 public AssetServerBase()
39 { 38 {
39
40 OpenSim.Framework.Console.MainLog.Instance.Verbose("ASSETSERVER","Starting asset storage system"); 40 OpenSim.Framework.Console.MainLog.Instance.Verbose("ASSETSERVER","Starting asset storage system");
41 this._assetRequests = new BlockingQueue<ARequest>(); 41 this._assetRequests = new BlockingQueue<ARequest>();
42 42
43 this._localAssetServerThread = new Thread( RunRequests ); 43 this._localAssetServerThread = new Thread(RunRequests);
44 this._localAssetServerThread.IsBackground = true; 44 this._localAssetServerThread.IsBackground = true;
45 this._localAssetServerThread.Start(); 45 this._localAssetServerThread.Start();
46 } 46 }
@@ -96,13 +96,13 @@ namespace OpenSim.Framework.Communications.Cache
96 } 96 }
97 97
98 public virtual void Close() 98 public virtual void Close()
99 { 99 {
100 _localAssetServerThread.Abort( ); 100 _localAssetServerThread.Abort();
101 } 101 }
102 102
103 public void SetServerInfo(string ServerUrl, string ServerKey) 103 public void SetServerInfo(string ServerUrl, string ServerKey)
104 { 104 {
105 105
106 } 106 }
107 107
108 public virtual List<AssetBase> GetDefaultAssets() 108 public virtual List<AssetBase> GetDefaultAssets()
@@ -149,13 +149,13 @@ namespace OpenSim.Framework.Communications.Cache
149 149
150 if (!String.IsNullOrEmpty(filename)) 150 if (!String.IsNullOrEmpty(filename))
151 { 151 {
152 MainLog.Instance.Verbose("ASSETS", "Loading: [{0}][{1}]", name, filename ); 152 MainLog.Instance.Verbose("ASSETS", "Loading: [{0}][{1}]", name, filename);
153 153
154 LoadAsset(asset, isImage, filename); 154 LoadAsset(asset, isImage, filename);
155 } 155 }
156 else 156 else
157 { 157 {
158 MainLog.Instance.Verbose("ASSETS", "Instantiated: [{0}]", name ); 158 MainLog.Instance.Verbose("ASSETS", "Instantiated: [{0}]", name);
159 } 159 }
160 160
161 return asset; 161 return asset;
@@ -164,7 +164,7 @@ namespace OpenSim.Framework.Communications.Cache
164 public void ForEachXmlAsset(Action<AssetBase> action) 164 public void ForEachXmlAsset(Action<AssetBase> action)
165 { 165 {
166 List<AssetBase> assets = new List<AssetBase>(); 166 List<AssetBase> assets = new List<AssetBase>();
167 // System.Console.WriteLine("trying loading asset into database"); 167 // System.Console.WriteLine("trying loading asset into database");
168 string filePath = Path.Combine(Util.configDir(), "OpenSimAssetSet.xml"); 168 string filePath = Path.Combine(Util.configDir(), "OpenSimAssetSet.xml");
169 if (File.Exists(filePath)) 169 if (File.Exists(filePath))
170 { 170 {
@@ -172,7 +172,7 @@ namespace OpenSim.Framework.Communications.Cache
172 172
173 for (int i = 0; i < source.Configs.Count; i++) 173 for (int i = 0; i < source.Configs.Count; i++)
174 { 174 {
175 // System.Console.WriteLine("loading asset into database"); 175 // System.Console.WriteLine("loading asset into database");
176 string assetIdStr = source.Configs[i].GetString("assetID", LLUUID.Random().ToStringHyphenated()); 176 string assetIdStr = source.Configs[i].GetString("assetID", LLUUID.Random().ToStringHyphenated());
177 string name = source.Configs[i].GetString("name", ""); 177 string name = source.Configs[i].GetString("name", "");
178 sbyte type = (sbyte)source.Configs[i].GetInt("assetType", 0); 178 sbyte type = (sbyte)source.Configs[i].GetInt("assetType", 0);
@@ -183,7 +183,7 @@ namespace OpenSim.Framework.Communications.Cache
183 183
184 newAsset.Type = type; 184 newAsset.Type = type;
185 newAsset.InvType = invType; 185 newAsset.InvType = invType;
186 assets.Add(newAsset); 186 assets.Add(newAsset);
187 } 187 }
188 } 188 }
189 assets.ForEach(action); 189 assets.ForEach(action);
diff --git a/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs b/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs
index 2c1e5c8..d622e02 100644
--- a/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs
@@ -32,8 +32,7 @@ using System.Text;
32using System.IO; 32using System.IO;
33using libsecondlife; 33using libsecondlife;
34using OpenSim.Framework.Interfaces; 34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types; 35using OpenSim.Framework;
36using OpenSim.Framework.Utilities;
37using OpenSim.Framework.Data; 36using OpenSim.Framework.Data;
38 37
39namespace OpenSim.Framework.Communications.Cache 38namespace OpenSim.Framework.Communications.Cache
diff --git a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs
index f23441d..e78f4f7 100644
--- a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs
@@ -34,8 +34,7 @@ using libsecondlife;
34using libsecondlife.Packets; 34using libsecondlife.Packets;
35using OpenSim.Framework.Communications.Cache; 35using OpenSim.Framework.Communications.Cache;
36using OpenSim.Framework.Interfaces; 36using OpenSim.Framework.Interfaces;
37using OpenSim.Framework.Types; 37using OpenSim.Framework;
38using OpenSim.Framework.Utilities;
39using OpenSim.Region.Capabilities; 38using OpenSim.Region.Capabilities;
40using OpenSim.Framework.Servers; 39using OpenSim.Framework.Servers;
41 40
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index 92b21a8..2d639d6 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -26,7 +26,7 @@
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29using OpenSim.Framework.Types; 29using OpenSim.Framework;
30 30
31namespace OpenSim.Framework.Communications.Cache 31namespace OpenSim.Framework.Communications.Cache
32{ 32{
diff --git a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
index 7483582..4904293 100644
--- a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
+++ b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
@@ -36,8 +36,7 @@ using libsecondlife;
36using Nini.Config; 36using Nini.Config;
37using OpenSim.Framework.Console; 37using OpenSim.Framework.Console;
38using OpenSim.Framework.Interfaces; 38using OpenSim.Framework.Interfaces;
39using OpenSim.Framework.Types; 39using OpenSim.Framework;
40using OpenSim.Framework.Utilities;
41using OpenSim.Framework.Communications; 40using OpenSim.Framework.Communications;
42 41
43namespace OpenSim.Framework.Communications.Cache 42namespace OpenSim.Framework.Communications.Cache
diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolder.cs b/OpenSim/Framework/Communications/Cache/InventoryFolder.cs
index af3346f..0905af8 100644
--- a/OpenSim/Framework/Communications/Cache/InventoryFolder.cs
+++ b/OpenSim/Framework/Communications/Cache/InventoryFolder.cs
@@ -32,8 +32,7 @@ using System.Text;
32using System.IO; 32using System.IO;
33using libsecondlife; 33using libsecondlife;
34using OpenSim.Framework.Interfaces; 34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types; 35using OpenSim.Framework;
36using OpenSim.Framework.Utilities;
37 36
38namespace OpenSim.Framework.Communications.Cache 37namespace OpenSim.Framework.Communications.Cache
39{ 38{
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
index 86e26f0..60f9b6b 100644
--- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
+++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
@@ -31,8 +31,7 @@ using System.IO;
31using System.Collections.Generic; 31using System.Collections.Generic;
32using System.Text; 32using System.Text;
33using libsecondlife; 33using libsecondlife;
34using OpenSim.Framework.Types; 34using OpenSim.Framework;
35using OpenSim.Framework.Utilities;
36using Nini.Config; 35using Nini.Config;
37 36
38namespace OpenSim.Framework.Communications.Cache 37namespace OpenSim.Framework.Communications.Cache
diff --git a/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs b/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs
index 296c612..0953e19 100644
--- a/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs
+++ b/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs
@@ -33,8 +33,7 @@ using libsecondlife;
33using Nini.Config; 33using Nini.Config;
34using OpenSim.Framework.Console; 34using OpenSim.Framework.Console;
35using OpenSim.Framework.Interfaces; 35using OpenSim.Framework.Interfaces;
36using OpenSim.Framework.Types; 36using OpenSim.Framework;
37using OpenSim.Framework.Utilities;
38 37
39namespace OpenSim.Framework.Communications.Cache 38namespace OpenSim.Framework.Communications.Cache
40{ 39{
@@ -42,14 +41,12 @@ namespace OpenSim.Framework.Communications.Cache
42 { 41 {
43 public SQLAssetServer(string pluginName) 42 public SQLAssetServer(string pluginName)
44 { 43 {
45 // _assetRequests = new BlockingQueue<ARequest>();
46 AddPlugin(pluginName); 44 AddPlugin(pluginName);
47 } 45 }
48 46
49 public SQLAssetServer(IAssetProvider assetProvider) 47 public SQLAssetServer(IAssetProvider assetProvider)
50 { 48 {
51 m_assetProviderPlugin = assetProvider; 49 m_assetProviderPlugin = assetProvider;
52
53 } 50 }
54 51
55 public void AddPlugin(string FileName) 52 public void AddPlugin(string FileName)
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCache.cs b/OpenSim/Framework/Communications/Cache/UserProfileCache.cs
index bd7aeef..8105556 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCache.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCache.cs
@@ -33,8 +33,8 @@ using System.IO;
33using libsecondlife; 33using libsecondlife;
34using OpenSim.Framework.Communications.Cache; 34using OpenSim.Framework.Communications.Cache;
35using OpenSim.Framework.Interfaces; 35using OpenSim.Framework.Interfaces;
36using OpenSim.Framework.Types; 36using OpenSim.Framework;
37using OpenSim.Framework.Utilities; 37
38 38
39namespace OpenSim.Framework.Communications.Cache 39namespace OpenSim.Framework.Communications.Cache
40{ 40{