* Cleaned out remaining references to the old LocalStorage system in prep. to move to StorageManager.
parent
f29acf95b0
commit
920ffaf24b
|
@ -111,7 +111,6 @@ namespace OpenSim.Region.ClientStack
|
|||
|
||||
udpServer.LocalWorld = scene;
|
||||
|
||||
scene.LoadStorageDLL("OpenSim.Region.Storage.LocalStorageDb4o.dll");
|
||||
scene.LoadWorldMap();
|
||||
|
||||
scene.PhysScene = GetPhysicsScene( );
|
||||
|
@ -124,13 +123,13 @@ namespace OpenSim.Region.ClientStack
|
|||
{
|
||||
m_log.Notice("Parcels - Found master avatar [" + masterAvatar.UUID.ToStringHyphenated() + "]");
|
||||
scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID;
|
||||
scene.localStorage.LoadLandObjects((ILocalStorageLandObjectReceiver)scene.LandManager);
|
||||
//TODO: Load parcels from storageManager
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Notice("Parcels - No master avatar found, using null.");
|
||||
scene.RegionInfo.MasterAvatarAssignedUUID = libsecondlife.LLUUID.Zero;
|
||||
scene.localStorage.LoadLandObjects((ILocalStorageLandObjectReceiver)scene.LandManager);
|
||||
//TODO: Load parcels from storageManager
|
||||
}
|
||||
scene.performParcelPrimCountUpdate();
|
||||
scene.StartTimer();
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue