29 using System.Collections.Generic;
33 using System.Reflection;
34 using OpenSim.Services.Base;
35 using OpenSim.Services.Interfaces;
37 using OpenSim.Framework;
38 using OpenSim.Region.Framework.Interfaces;
39 using OpenSim.Region.Framework.Scenes;
41 namespace OpenSim.Services.SimulationService
54 string dllName = String.Empty;
55 string connString = String.Empty;
58 IConfig dbConfig = config.Configs[
"DatabaseService"];
61 dllName = dbConfig.GetString(
"StorageProvider", String.Empty);
62 connString = dbConfig.GetString(
"ConnectionString", String.Empty);
66 IConfig simConfig = config.Configs[
"SimulationDataStore"];
67 if (simConfig != null)
69 dllName = simConfig.GetString(
"StorageProvider", dllName);
70 connString = simConfig.GetString(
"ConnectionString", connString);
74 if (dllName ==
String.Empty)
75 throw new Exception(
"No StorageProvider configured");
77 m_database = LoadPlugin<ISimulationDataStore>(dllName,
new Object[] { connString });
78 if (m_database == null)
79 throw new Exception(
"Could not find a storage interface in the given module");
84 m_database.StoreObject(obj, regionUUID);
89 m_database.RemoveObject(uuid, regionUUID);
94 m_database.StorePrimInventory(primID, items);
99 return m_database.LoadObjects(regionUUID);
104 m_database.StoreTerrain(terrain, regionID);
109 m_database.StoreTerrain(terrain, regionID);
114 return m_database.LoadTerrain(regionID);
119 return m_database.LoadTerrain(regionID, pSizeX, pSizeY, pSizeZ);
124 m_database.StoreLandObject(Parcel);
129 m_database.RemoveLandObject(globalID);
134 return m_database.LoadLandObjects(regionUUID);
139 m_database.StoreRegionSettings(rs);
144 return m_database.LoadRegionSettings(regionUUID);
149 return m_database.LoadRegionWindlightSettings(regionUUID);
154 m_database.StoreRegionWindlightSettings(wl);
158 m_database.RemoveRegionWindlightSettings(regionID);
163 return m_database.LoadRegionEnvironmentSettings(regionUUID);
168 m_database.StoreRegionEnvironmentSettings(regionUUID, settings);
173 m_database.RemoveRegionEnvironmentSettings(regionUUID);
178 return m_database.GetObjectIDs(regionID);
181 public void SaveExtra(UUID regionID,
string name,
string val)
183 m_database.SaveExtra(regionID, name, val);
188 m_database.RemoveExtra(regionID, name);
191 public Dictionary<string, string>
GetExtra(UUID regionID)
193 return m_database.GetExtra(regionID);
UUID[] GetObjectIDs(UUID regionID)
void RemoveLandObject(UUID globalID)
delete from land where UUID=globalID delete from landaccesslist where LandUUID=globalID ...
void StoreObject(SceneObjectGroup obj, UUID regionUUID)
Stores all object's details apart from inventory
void StoreLandObject(ILandObject Parcel)
void RemoveRegionEnvironmentSettings(UUID regionUUID)
Delete Environment settings from region storage
void RemoveExtra(UUID regionID, string name)
SimulationDataService(IConfigSource config)
A scene object group is conceptually an object in the scene. The object is constituted of SceneObject...
void StoreRegionSettings(RegionSettings rs)
RegionSettings LoadRegionSettings(UUID regionUUID)
RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID)
ISimulationDataStore m_database
void StoreRegionEnvironmentSettings(UUID regionUUID, string settings)
Store Environment settings into region storage
void StoreTerrain(TerrainData terrain, UUID regionID)
Store a terrain revision in region storage
double[,] LoadTerrain(UUID regionID)
void RemoveRegionWindlightSettings(UUID regionID)
void RemoveObject(UUID uuid, UUID regionUUID)
Entirely removes the object, including inventory
void StorePrimInventory(UUID primID, ICollection< TaskInventoryItem > items)
Store a prim's inventory
TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ)
Load the latest terrain revision from region storage
Dictionary< string, string > GetExtra(UUID regionID)
void SaveExtra(UUID regionID, string name, string val)
Interactive OpenSim region server
void StoreTerrain(double[,] terrain, UUID regionID)
string LoadRegionEnvironmentSettings(UUID regionUUID)
Load Environment settings from region storage
List< SceneObjectGroup > LoadObjects(UUID regionUUID)
Load persisted objects from region storage.
void StoreRegionWindlightSettings(RegionLightShareData wl)
List< LandData > LoadLandObjects(UUID regionUUID)