mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
* Cleaned out remaining references to the old LocalStorage system in prep. to move to StorageManager.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -439,7 +439,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
public void LoadPrimsFromStorage()
|
||||
{
|
||||
MainLog.Instance.Verbose("World.cs: LoadPrimsFromStorage() - Loading primitives");
|
||||
localStorage.LoadPrimitives(this);
|
||||
List<SceneObject> NewObjectsList = storageManager.DataStore.LoadObjects();
|
||||
foreach (SceneObject obj in NewObjectsList)
|
||||
{
|
||||
this.Objects.Add(obj.rootUUID, obj);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -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;
|
||||
@@ -69,44 +68,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
/// </summary>
|
||||
public abstract void LoadWorldMap();
|
||||
|
||||
/// <summary>
|
||||
/// Loads a new storage subsystem from a named library
|
||||
/// </summary>
|
||||
/// <param name="dllName">Storage Library</param>
|
||||
/// <returns>Successful or not</returns>
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Send the region heightmap to the client
|
||||
/// </summary>
|
||||
@@ -173,7 +134,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
try
|
||||
{
|
||||
this.localStorage.ShutDown();
|
||||
//TODO: Add cleanup code for storage manager, etc.
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user