diff options
Diffstat (limited to 'OpenSim/Region/Storage/LocalStorageDb4o')
5 files changed, 10 insertions, 30 deletions
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 |