diff options
author | Adam Frisby | 2007-07-19 00:42:59 +0000 |
---|---|---|
committer | Adam Frisby | 2007-07-19 00:42:59 +0000 |
commit | 920ffaf24bc3bb5f8b7578f86efc1d5e9c52cec4 (patch) | |
tree | 950bf957d64ac5ab909d311258ccc89630c7aabe /OpenSim/Region/Environment | |
parent | * Removed yet more compiler warnings (diff) | |
download | opensim-SC-920ffaf24bc3bb5f8b7578f86efc1d5e9c52cec4.zip opensim-SC-920ffaf24bc3bb5f8b7578f86efc1d5e9c52cec4.tar.gz opensim-SC-920ffaf24bc3bb5f8b7578f86efc1d5e9c52cec4.tar.bz2 opensim-SC-920ffaf24bc3bb5f8b7578f86efc1d5e9c52cec4.tar.xz |
* Cleaned out remaining references to the old LocalStorage system in prep. to move to StorageManager.
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r-- | OpenSim/Region/Environment/LandManagement/LandManager.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneBase.cs | 41 |
3 files changed, 7 insertions, 42 deletions
diff --git a/OpenSim/Region/Environment/LandManagement/LandManager.cs b/OpenSim/Region/Environment/LandManagement/LandManager.cs index a596fae..be2913b 100644 --- a/OpenSim/Region/Environment/LandManagement/LandManager.cs +++ b/OpenSim/Region/Environment/LandManagement/LandManager.cs | |||
@@ -174,7 +174,7 @@ namespace OpenSim.Region.Environment.LandManagement | |||
174 | } | 174 | } |
175 | } | 175 | } |
176 | } | 176 | } |
177 | m_world.localStorage.RemoveLandObject(landList[local_id].landData); | 177 | // TODO: Put event here for storage manager to bind to. |
178 | landList.Remove(local_id); | 178 | landList.Remove(local_id); |
179 | } | 179 | } |
180 | 180 | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 1ba23b4..3abd96d 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -439,7 +439,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
439 | public void LoadPrimsFromStorage() | 439 | public void LoadPrimsFromStorage() |
440 | { | 440 | { |
441 | MainLog.Instance.Verbose("World.cs: LoadPrimsFromStorage() - Loading primitives"); | 441 | MainLog.Instance.Verbose("World.cs: LoadPrimsFromStorage() - Loading primitives"); |
442 | localStorage.LoadPrimitives(this); | 442 | List<SceneObject> NewObjectsList = storageManager.DataStore.LoadObjects(); |
443 | foreach (SceneObject obj in NewObjectsList) | ||
444 | { | ||
445 | this.Objects.Add(obj.rootUUID, obj); | ||
446 | } | ||
443 | } | 447 | } |
444 | 448 | ||
445 | /// <summary> | 449 | /// <summary> |
diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs index 4326553..2c50e4d 100644 --- a/OpenSim/Region/Environment/Scenes/SceneBase.cs +++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs | |||
@@ -48,7 +48,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
48 | public TerrainEngine Terrain; | 48 | public TerrainEngine Terrain; |
49 | 49 | ||
50 | protected string m_datastore; | 50 | protected string m_datastore; |
51 | public ILocalStorage localStorage; | ||
52 | 51 | ||
53 | protected object m_syncRoot = new object(); | 52 | protected object m_syncRoot = new object(); |
54 | private uint m_nextLocalId = 8880000; | 53 | private uint m_nextLocalId = 8880000; |
@@ -70,44 +69,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
70 | public abstract void LoadWorldMap(); | 69 | public abstract void LoadWorldMap(); |
71 | 70 | ||
72 | /// <summary> | 71 | /// <summary> |
73 | /// Loads a new storage subsystem from a named library | ||
74 | /// </summary> | ||
75 | /// <param name="dllName">Storage Library</param> | ||
76 | /// <returns>Successful or not</returns> | ||
77 | public bool LoadStorageDLL(string dllName) | ||
78 | { | ||
79 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); | ||
80 | ILocalStorage store = null; | ||
81 | |||
82 | foreach (Type pluginType in pluginAssembly.GetTypes()) | ||
83 | { | ||
84 | if (pluginType.IsPublic) | ||
85 | { | ||
86 | if (!pluginType.IsAbstract) | ||
87 | { | ||
88 | Type typeInterface = pluginType.GetInterface("ILocalStorage", true); | ||
89 | |||
90 | if (typeInterface != null) | ||
91 | { | ||
92 | ILocalStorage plug = (ILocalStorage)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | ||
93 | store = plug; | ||
94 | |||
95 | store.Initialise(this.m_datastore); | ||
96 | break; | ||
97 | } | ||
98 | |||
99 | typeInterface = null; | ||
100 | } | ||
101 | } | ||
102 | } | ||
103 | pluginAssembly = null; | ||
104 | this.localStorage = store; | ||
105 | return (store == null); | ||
106 | |||
107 | } | ||
108 | |||
109 | |||
110 | /// <summary> | ||
111 | /// Send the region heightmap to the client | 72 | /// Send the region heightmap to the client |
112 | /// </summary> | 73 | /// </summary> |
113 | /// <param name="RemoteClient">Client to send to</param> | 74 | /// <param name="RemoteClient">Client to send to</param> |
@@ -173,7 +134,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
173 | { | 134 | { |
174 | try | 135 | try |
175 | { | 136 | { |
176 | this.localStorage.ShutDown(); | 137 | //TODO: Add cleanup code for storage manager, etc. |
177 | } | 138 | } |
178 | catch (Exception e) | 139 | catch (Exception e) |
179 | { | 140 | { |