From 920ffaf24bc3bb5f8b7578f86efc1d5e9c52cec4 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Thu, 19 Jul 2007 00:42:59 +0000 Subject: * Cleaned out remaining references to the old LocalStorage system in prep. to move to StorageManager. --- .../Environment/LandManagement/LandManager.cs | 2 +- OpenSim/Region/Environment/Scenes/Scene.cs | 6 +++- OpenSim/Region/Environment/Scenes/SceneBase.cs | 41 +--------------------- 3 files changed, 7 insertions(+), 42 deletions(-) (limited to 'OpenSim/Region/Environment') 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 } } } - m_world.localStorage.RemoveLandObject(landList[local_id].landData); + // TODO: Put event here for storage manager to bind to. landList.Remove(local_id); } 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 public void LoadPrimsFromStorage() { MainLog.Instance.Verbose("World.cs: LoadPrimsFromStorage() - Loading primitives"); - localStorage.LoadPrimitives(this); + List NewObjectsList = storageManager.DataStore.LoadObjects(); + foreach (SceneObject obj in NewObjectsList) + { + this.Objects.Add(obj.rootUUID, obj); + } } /// 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 public TerrainEngine Terrain; protected string m_datastore; - public ILocalStorage localStorage; protected object m_syncRoot = new object(); private uint m_nextLocalId = 8880000; @@ -70,44 +69,6 @@ namespace OpenSim.Region.Environment.Scenes public abstract void LoadWorldMap(); /// - /// Loads a new storage subsystem from a named library - /// - /// Storage Library - /// Successful or not - public bool LoadStorageDLL(string dllName) - { - Assembly pluginAssembly = Assembly.LoadFrom(dllName); - ILocalStorage store = null; - - foreach (Type pluginType in pluginAssembly.GetTypes()) - { - if (pluginType.IsPublic) - { - if (!pluginType.IsAbstract) - { - Type typeInterface = pluginType.GetInterface("ILocalStorage", true); - - if (typeInterface != null) - { - ILocalStorage plug = (ILocalStorage)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); - store = plug; - - store.Initialise(this.m_datastore); - break; - } - - typeInterface = null; - } - } - } - pluginAssembly = null; - this.localStorage = store; - return (store == null); - - } - - - /// /// Send the region heightmap to the client /// /// Client to send to @@ -173,7 +134,7 @@ namespace OpenSim.Region.Environment.Scenes { try { - this.localStorage.ShutDown(); + //TODO: Add cleanup code for storage manager, etc. } catch (Exception e) { -- cgit v1.1