mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +08:00
* Cleaned out remaining references to the old LocalStorage system in prep. to move to StorageManager.
This commit is contained in:
@@ -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