diff options
author | lbsa71 | 2007-07-03 14:37:29 +0000 |
---|---|---|
committer | lbsa71 | 2007-07-03 14:37:29 +0000 |
commit | 9b6b6d05d45cf0f754a0b26bf6240ef50be66563 (patch) | |
tree | 8d72120aac2184c5ed4c5ab5f6b673ef496a0803 /OpenSim/Region/Storage | |
parent | * Completed conceptual LlsdMethod - everything resides in SimpleApp pending g... (diff) | |
download | opensim-SC-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.zip opensim-SC-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.tar.gz opensim-SC-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.tar.bz2 opensim-SC-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.tar.xz |
* Optimized usings (the 'LL ate my scripts' commit)
* added some licensing info
Diffstat (limited to 'OpenSim/Region/Storage')
8 files changed, 19 insertions, 46 deletions
diff --git a/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs b/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs index 3bc6f25..39ba6e4 100644 --- a/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs +++ b/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs | |||
@@ -29,15 +29,10 @@ | |||
29 | // BDB Support | 29 | // BDB Support |
30 | // Apparently broken on Mono | 30 | // Apparently broken on Mono |
31 | 31 | ||
32 | using System; | 32 | using BerkeleyDb; |
33 | using System.Collections.Generic; | ||
34 | using System.Data; | ||
35 | using libsecondlife; | 33 | using libsecondlife; |
36 | using OpenSim.Framework.Interfaces; | 34 | using OpenSim.Framework.Interfaces; |
37 | using OpenSim.Framework.Types; | 35 | using OpenSim.Framework.Types; |
38 | using BerkeleyDb; | ||
39 | using Kds.Serialization; | ||
40 | using Kds.Serialization.Buffer; | ||
41 | 36 | ||
42 | namespace OpenSim.Region.Storage.LocalStorageBDB | 37 | namespace OpenSim.Region.Storage.LocalStorageBDB |
43 | { | 38 | { |
@@ -52,7 +47,7 @@ namespace OpenSim.Region.Storage.LocalStorageBDB | |||
52 | public BDBLocalStorage() | 47 | public BDBLocalStorage() |
53 | { | 48 | { |
54 | DB = new Db(DbCreateFlags.None); | 49 | DB = new Db(DbCreateFlags.None); |
55 | sim = (DbHash)DB.Open(null, simDbName, null, BerkeleyDb.DbType.Hash, Db.OpenFlags.Create, 0); | 50 | sim = (DbHash)DB.Open(null, simDbName, null, DbType.Hash, Db.OpenFlags.Create, 0); |
56 | //vendorDb = (DbBTree)db.Open(null, VendorDbName, null, DbType.BTree, Db.OpenFlags.Create, 0); | 51 | //vendorDb = (DbBTree)db.Open(null, VendorDbName, null, DbType.BTree, Db.OpenFlags.Create, 0); |
57 | } | 52 | } |
58 | 53 | ||
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/AssemblyInfo.cs b/OpenSim/Region/Storage/LocalStorageDb4o/AssemblyInfo.cs index ea2b62e..4463ac9 100644 --- a/OpenSim/Region/Storage/LocalStorageDb4o/AssemblyInfo.cs +++ b/OpenSim/Region/Storage/LocalStorageDb4o/AssemblyInfo.cs | |||
@@ -26,9 +26,7 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.CompilerServices; | ||
30 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
31 | |||
32 | // Information about this assembly is defined by the following | 30 | // Information about this assembly is defined by the following |
33 | // attributes. | 31 | // attributes. |
34 | // | 32 | // |
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs b/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs index 5cb4861..8214bc8 100644 --- a/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs +++ b/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs | |||
@@ -26,15 +26,11 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
30 | using Db4objects.Db4o; | 29 | using Db4objects.Db4o; |
31 | using Db4objects.Db4o.Query; | ||
32 | |||
33 | using libsecondlife; | 30 | using libsecondlife; |
31 | using OpenSim.Framework.Console; | ||
34 | using OpenSim.Framework.Interfaces; | 32 | using OpenSim.Framework.Interfaces; |
35 | using OpenSim.Framework.Types; | 33 | using OpenSim.Framework.Types; |
36 | using OpenSim.Framework.Console; | ||
37 | |||
38 | 34 | ||
39 | namespace OpenSim.Region.Storage.LocalStorageDb4o | 35 | namespace OpenSim.Region.Storage.LocalStorageDb4o |
40 | { | 36 | { |
@@ -53,18 +49,18 @@ namespace OpenSim.Region.Storage.LocalStorageDb4o | |||
53 | 49 | ||
54 | public void Initialise(string dfile) | 50 | public void Initialise(string dfile) |
55 | { | 51 | { |
56 | OpenSim.Framework.Console.MainLog.Instance.Warn("Db4LocalStorage Opening " + dfile); | 52 | MainLog.Instance.Warn("Db4LocalStorage Opening " + dfile); |
57 | datastore = dfile; | 53 | datastore = dfile; |
58 | try | 54 | try |
59 | { | 55 | { |
60 | db = Db4oFactory.OpenFile(datastore); | 56 | db = Db4oFactory.OpenFile(datastore); |
61 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Db4LocalStorage creation"); | 57 | MainLog.Instance.Verbose("Db4LocalStorage creation"); |
62 | } | 58 | } |
63 | catch (Exception e) | 59 | catch (Exception e) |
64 | { | 60 | { |
65 | db.Close(); | 61 | db.Close(); |
66 | OpenSim.Framework.Console.MainLog.Instance.Warn("Db4LocalStorage :Constructor - Exception occured"); | 62 | MainLog.Instance.Warn("Db4LocalStorage :Constructor - Exception occured"); |
67 | OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); | 63 | MainLog.Instance.Warn(e.ToString()); |
68 | } | 64 | } |
69 | } | 65 | } |
70 | 66 | ||
@@ -123,7 +119,7 @@ namespace OpenSim.Region.Storage.LocalStorageDb4o | |||
123 | public void LoadPrimitives(ILocalStorageReceiver receiver) | 119 | public void LoadPrimitives(ILocalStorageReceiver receiver) |
124 | { | 120 | { |
125 | IObjectSet result = db.Get(typeof(PrimData)); | 121 | IObjectSet result = db.Get(typeof(PrimData)); |
126 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Db4LocalStorage.cs: LoadPrimitives() - number of prims in storages is " + result.Count); | 122 | MainLog.Instance.Verbose("Db4LocalStorage.cs: LoadPrimitives() - number of prims in storages is " + result.Count); |
127 | foreach (PrimData prim in result) | 123 | foreach (PrimData prim in result) |
128 | { | 124 | { |
129 | receiver.PrimFromStorage(prim); | 125 | receiver.PrimFromStorage(prim); |
@@ -132,13 +128,13 @@ namespace OpenSim.Region.Storage.LocalStorageDb4o | |||
132 | 128 | ||
133 | public float[] LoadWorld() | 129 | public float[] LoadWorld() |
134 | { | 130 | { |
135 | OpenSim.Framework.Console.MainLog.Instance.Verbose("LoadWorld() - Loading world...."); | 131 | MainLog.Instance.Verbose("LoadWorld() - Loading world...."); |
136 | float[] heightmap = null; | 132 | float[] heightmap = null; |
137 | OpenSim.Framework.Console.MainLog.Instance.Verbose("LoadWorld() - Looking for a heightmap in local DB"); | 133 | MainLog.Instance.Verbose("LoadWorld() - Looking for a heightmap in local DB"); |
138 | IObjectSet world_result = db.Get(typeof(MapStorage)); | 134 | IObjectSet world_result = db.Get(typeof(MapStorage)); |
139 | if (world_result.Count > 0) | 135 | if (world_result.Count > 0) |
140 | { | 136 | { |
141 | OpenSim.Framework.Console.MainLog.Instance.Verbose("LoadWorld() - Found a heightmap in local database, loading"); | 137 | MainLog.Instance.Verbose("LoadWorld() - Found a heightmap in local database, loading"); |
142 | MapStorage map = (MapStorage)world_result.Next(); | 138 | MapStorage map = (MapStorage)world_result.Next(); |
143 | //blank.LandMap = map.Map; | 139 | //blank.LandMap = map.Map; |
144 | heightmap = map.Map; | 140 | heightmap = map.Map; |
@@ -151,7 +147,7 @@ namespace OpenSim.Region.Storage.LocalStorageDb4o | |||
151 | IObjectSet world_result = db.Get(typeof(MapStorage)); | 147 | IObjectSet world_result = db.Get(typeof(MapStorage)); |
152 | if (world_result.Count > 0) | 148 | if (world_result.Count > 0) |
153 | { | 149 | { |
154 | OpenSim.Framework.Console.MainLog.Instance.Verbose("SaveWorld() - updating saved copy of heightmap in local database"); | 150 | MainLog.Instance.Verbose("SaveWorld() - updating saved copy of heightmap in local database"); |
155 | MapStorage map = (MapStorage)world_result.Next(); | 151 | MapStorage map = (MapStorage)world_result.Next(); |
156 | db.Delete(map); | 152 | db.Delete(map); |
157 | } | 153 | } |
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/MapStorage.cs b/OpenSim/Region/Storage/LocalStorageDb4o/MapStorage.cs index 22f3392..ec82d02 100644 --- a/OpenSim/Region/Storage/LocalStorageDb4o/MapStorage.cs +++ b/OpenSim/Region/Storage/LocalStorageDb4o/MapStorage.cs | |||
@@ -25,10 +25,6 @@ | |||
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 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | |||
32 | namespace OpenSim.Region.Storage.LocalStorageDb4o | 28 | namespace OpenSim.Region.Storage.LocalStorageDb4o |
33 | { | 29 | { |
34 | public class MapStorage | 30 | public class MapStorage |
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs index dcbe639..6e6768c 100644 --- a/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs +++ b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs | |||
@@ -25,13 +25,8 @@ | |||
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 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | using Db4objects.Db4o; | ||
32 | using Db4objects.Db4o.Query; | 28 | using Db4objects.Db4o.Query; |
33 | using libsecondlife; | 29 | using libsecondlife; |
34 | using OpenSim.Framework.Interfaces; | ||
35 | using OpenSim.Framework.Types; | 30 | using OpenSim.Framework.Types; |
36 | 31 | ||
37 | namespace OpenSim.Region.Storage.LocalStorageDb4o | 32 | namespace OpenSim.Region.Storage.LocalStorageDb4o |
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/UUIDPrimQuery.cs b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDPrimQuery.cs index 23de6dd..eb309cb 100644 --- a/OpenSim/Region/Storage/LocalStorageDb4o/UUIDPrimQuery.cs +++ b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDPrimQuery.cs | |||
@@ -25,13 +25,8 @@ | |||
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 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | using Db4objects.Db4o; | ||
32 | using Db4objects.Db4o.Query; | 28 | using Db4objects.Db4o.Query; |
33 | using libsecondlife; | 29 | using libsecondlife; |
34 | using OpenSim.Framework.Interfaces; | ||
35 | using OpenSim.Framework.Types; | 30 | using OpenSim.Framework.Types; |
36 | 31 | ||
37 | namespace OpenSim.Region.Storage.LocalStorageDb4o | 32 | namespace OpenSim.Region.Storage.LocalStorageDb4o |
diff --git a/OpenSim/Region/Storage/LocalStorageSQLite/Properties/AssemblyInfo.cs b/OpenSim/Region/Storage/LocalStorageSQLite/Properties/AssemblyInfo.cs index 80158d5..ea9cda8 100644 --- a/OpenSim/Region/Storage/LocalStorageSQLite/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Storage/LocalStorageSQLite/Properties/AssemblyInfo.cs | |||
@@ -26,9 +26,7 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.CompilerServices; | ||
30 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
31 | |||
32 | // General Information about an assembly is controlled through the following | 30 | // General Information about an assembly is controlled through the following |
33 | // set of attributes. Change these attribute values to modify the information | 31 | // set of attributes. Change these attribute values to modify the information |
34 | // associated with an assembly. | 32 | // associated with an assembly. |
diff --git a/OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs b/OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs index b407be4..9900a98 100644 --- a/OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs +++ b/OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs | |||
@@ -30,10 +30,10 @@ | |||
30 | // A bad idea, but the IRC people told me to! | 30 | // A bad idea, but the IRC people told me to! |
31 | 31 | ||
32 | using System; | 32 | using System; |
33 | using System.Collections.Generic; | ||
34 | using System.Data; | 33 | using System.Data; |
35 | using System.Data.SQLite; | 34 | using System.Data.SQLite; |
36 | using libsecondlife; | 35 | using libsecondlife; |
36 | using OpenSim.Framework.Console; | ||
37 | using OpenSim.Framework.Interfaces; | 37 | using OpenSim.Framework.Interfaces; |
38 | using OpenSim.Framework.Types; | 38 | using OpenSim.Framework.Types; |
39 | 39 | ||
@@ -54,8 +54,8 @@ namespace OpenSim.Region.Storage.LocalStorageSQLite | |||
54 | catch (Exception e) | 54 | catch (Exception e) |
55 | { | 55 | { |
56 | db.Close(); | 56 | db.Close(); |
57 | OpenSim.Framework.Console.MainLog.Instance.Warn("SQLiteLocalStorage :Constructor - Exception occured"); | 57 | MainLog.Instance.Warn("SQLiteLocalStorage :Constructor - Exception occured"); |
58 | OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); | 58 | MainLog.Instance.Warn(e.ToString()); |
59 | } | 59 | } |
60 | } | 60 | } |
61 | 61 | ||
@@ -117,8 +117,8 @@ namespace OpenSim.Region.Storage.LocalStorageSQLite | |||
117 | } | 117 | } |
118 | catch (Exception e) | 118 | catch (Exception e) |
119 | { | 119 | { |
120 | OpenSim.Framework.Console.MainLog.Instance.Warn("SQLiteLocalStorage :StorePrim - Exception occured"); | 120 | MainLog.Instance.Warn("SQLiteLocalStorage :StorePrim - Exception occured"); |
121 | OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); | 121 | MainLog.Instance.Warn(e.ToString()); |
122 | } | 122 | } |
123 | 123 | ||
124 | cmd.Dispose(); | 124 | cmd.Dispose(); |
@@ -144,8 +144,8 @@ namespace OpenSim.Region.Storage.LocalStorageSQLite | |||
144 | } | 144 | } |
145 | catch (Exception e) | 145 | catch (Exception e) |
146 | { | 146 | { |
147 | OpenSim.Framework.Console.MainLog.Instance.Warn("SQLiteLocalStorage :RemovePrim - Exception occured"); | 147 | MainLog.Instance.Warn("SQLiteLocalStorage :RemovePrim - Exception occured"); |
148 | OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); | 148 | MainLog.Instance.Warn(e.ToString()); |
149 | } | 149 | } |
150 | 150 | ||
151 | cmd.Dispose(); | 151 | cmd.Dispose(); |