Fixed the naming mess around data connectors for simulation data
parent
47ac9f97b1
commit
109b517583
|
@ -43,7 +43,7 @@ namespace OpenSim.Data.MSSQL
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A MSSQL Interface for the Region Server.
|
/// A MSSQL Interface for the Region Server.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class MSSQLRegionDataStore : IRegionDataStore
|
public class MSSQLSimulationData : ISimulationDataStore
|
||||||
{
|
{
|
||||||
private const string _migrationStore = "RegionStore";
|
private const string _migrationStore = "RegionStore";
|
||||||
|
|
|
@ -45,7 +45,7 @@ namespace OpenSim.Data.MySQL
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A MySQL Interface for the Region Server
|
/// A MySQL Interface for the Region Server
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class MySQLDataStore : IRegionDataStore
|
public class MySQLSimulationData : ISimulationDataStore
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
|
@ -36,7 +36,7 @@ namespace OpenSim.Data.Null
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// NULL DataStore, do not store anything
|
/// NULL DataStore, do not store anything
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class NullDataStore : IRegionDataStore
|
public class NullSimulationData : ISimulationDataStore
|
||||||
{
|
{
|
||||||
public void Initialise(string dbfile)
|
public void Initialise(string dbfile)
|
||||||
{
|
{
|
|
@ -44,7 +44,7 @@ namespace OpenSim.Data.SQLite
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A RegionData Interface to the SQLite database
|
/// A RegionData Interface to the SQLite database
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SQLiteRegionData : IRegionDataStore
|
public class SQLiteSimulationData : ISimulationDataStore
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace OpenSim.Data.SQLiteLegacy
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A RegionData Interface to the SQLite database
|
/// A RegionData Interface to the SQLite database
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SQLiteRegionData : IRegionDataStore
|
public class SQLiteSimulationData : ISimulationDataStore
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
|
@ -61,17 +61,17 @@ namespace OpenSim.Data.Tests
|
||||||
#else
|
#else
|
||||||
|
|
||||||
[TestFixture(Description = "Region store tests (SQLite)")]
|
[TestFixture(Description = "Region store tests (SQLite)")]
|
||||||
public class SQLiteRegionTests : RegionTests<SqliteConnection, SQLiteRegionData>
|
public class SQLiteRegionTests : RegionTests<SqliteConnection, SQLiteSimulationData>
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestFixture(Description = "Region store tests (MySQL)")]
|
[TestFixture(Description = "Region store tests (MySQL)")]
|
||||||
public class MySqlRegionTests : RegionTests<MySqlConnection, MySQLDataStore>
|
public class MySqlRegionTests : RegionTests<MySqlConnection, MySQLSimulationData>
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestFixture(Description = "Region store tests (MS SQL Server)")]
|
[TestFixture(Description = "Region store tests (MS SQL Server)")]
|
||||||
public class MSSQLRegionTests : RegionTests<SqlConnection, MSSQLRegionDataStore>
|
public class MSSQLRegionTests : RegionTests<SqlConnection, MSSQLSimulationData>
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,11 +79,11 @@ namespace OpenSim.Data.Tests
|
||||||
|
|
||||||
public class RegionTests<TConn, TRegStore> : BasicDataServiceTest<TConn, TRegStore>
|
public class RegionTests<TConn, TRegStore> : BasicDataServiceTest<TConn, TRegStore>
|
||||||
where TConn : DbConnection, new()
|
where TConn : DbConnection, new()
|
||||||
where TRegStore : class, IRegionDataStore, new()
|
where TRegStore : class, ISimulationDataStore, new()
|
||||||
{
|
{
|
||||||
bool m_rebuildDB;
|
bool m_rebuildDB;
|
||||||
|
|
||||||
public IRegionDataStore db;
|
public ISimulationDataStore db;
|
||||||
public UUID zero = UUID.Zero;
|
public UUID zero = UUID.Zero;
|
||||||
public UUID region1 = UUID.Random();
|
public UUID region1 = UUID.Random();
|
||||||
public UUID region2 = UUID.Random();
|
public UUID region2 = UUID.Random();
|
||||||
|
@ -122,7 +122,7 @@ namespace OpenSim.Data.Tests
|
||||||
protected override void InitService(object service)
|
protected override void InitService(object service)
|
||||||
{
|
{
|
||||||
ClearDB();
|
ClearDB();
|
||||||
db = (IRegionDataStore)service;
|
db = (ISimulationDataStore)service;
|
||||||
db.Initialise(m_connStr);
|
db.Initialise(m_connStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
/// Backup the inventory to the given data store
|
/// Backup the inventory to the given data store
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="datastore"></param>
|
/// <param name="datastore"></param>
|
||||||
void ProcessInventoryBackup(IRegionDataStore datastore);
|
void ProcessInventoryBackup(ISimulationDataStore datastore);
|
||||||
|
|
||||||
uint MaskEffectivePermissions();
|
uint MaskEffectivePermissions();
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
|
|
||||||
namespace OpenSim.Region.Framework.Interfaces
|
namespace OpenSim.Region.Framework.Interfaces
|
||||||
{
|
{
|
||||||
public interface IRegionDataStore
|
public interface ISimulationDataStore
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initialises the data storage engine
|
/// Initialises the data storage engine
|
|
@ -57,7 +57,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public event OnTerrainTickDelegate OnTerrainTick;
|
public event OnTerrainTickDelegate OnTerrainTick;
|
||||||
|
|
||||||
public delegate void OnBackupDelegate(IRegionDataStore datastore, bool forceBackup);
|
public delegate void OnBackupDelegate(ISimulationDataStore datastore, bool forceBackup);
|
||||||
|
|
||||||
public event OnBackupDelegate OnBackup;
|
public event OnBackupDelegate OnBackup;
|
||||||
|
|
||||||
|
@ -684,7 +684,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TriggerOnBackup(IRegionDataStore dstore, bool forced)
|
public void TriggerOnBackup(ISimulationDataStore dstore, bool forced)
|
||||||
{
|
{
|
||||||
OnBackupDelegate handlerOnAttach = OnBackup;
|
OnBackupDelegate handlerOnAttach = OnBackup;
|
||||||
if (handlerOnAttach != null)
|
if (handlerOnAttach != null)
|
||||||
|
|
|
@ -1378,7 +1378,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// Processes backup.
|
/// Processes backup.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="datastore"></param>
|
/// <param name="datastore"></param>
|
||||||
public virtual void ProcessBackup(IRegionDataStore datastore, bool forcedBackup)
|
public virtual void ProcessBackup(ISimulationDataStore datastore, bool forcedBackup)
|
||||||
{
|
{
|
||||||
if (!m_isBackedUp)
|
if (!m_isBackedUp)
|
||||||
{
|
{
|
||||||
|
|
|
@ -848,7 +848,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// Process inventory backup
|
/// Process inventory backup
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="datastore"></param>
|
/// <param name="datastore"></param>
|
||||||
public void ProcessInventoryBackup(IRegionDataStore datastore)
|
public void ProcessInventoryBackup(ISimulationDataStore datastore)
|
||||||
{
|
{
|
||||||
if (HasInventoryChanged)
|
if (HasInventoryChanged)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,9 +36,9 @@ namespace OpenSim.Region.Framework
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
protected IRegionDataStore m_dataStore;
|
protected ISimulationDataStore m_dataStore;
|
||||||
|
|
||||||
public IRegionDataStore DataStore
|
public ISimulationDataStore DataStore
|
||||||
{
|
{
|
||||||
get { return m_dataStore; }
|
get { return m_dataStore; }
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ namespace OpenSim.Region.Framework
|
||||||
get { return m_estateDataStore; }
|
get { return m_estateDataStore; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public StorageManager(IRegionDataStore storage)
|
public StorageManager(ISimulationDataStore storage)
|
||||||
{
|
{
|
||||||
m_dataStore = storage;
|
m_dataStore = storage;
|
||||||
}
|
}
|
||||||
|
@ -68,8 +68,8 @@ namespace OpenSim.Region.Framework
|
||||||
|
|
||||||
if (typeInterface != null)
|
if (typeInterface != null)
|
||||||
{
|
{
|
||||||
IRegionDataStore plug =
|
ISimulationDataStore plug =
|
||||||
(IRegionDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
(ISimulationDataStore)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
||||||
plug.Initialise(connectionstring);
|
plug.Initialise(connectionstring);
|
||||||
|
|
||||||
m_dataStore = plug;
|
m_dataStore = plug;
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace OpenSim.Data.Null
|
||||||
/// Mock region data plugin. This obeys the api contract for persistence but stores everything in memory, so that
|
/// Mock region data plugin. This obeys the api contract for persistence but stores everything in memory, so that
|
||||||
/// tests can check correct persistence.
|
/// tests can check correct persistence.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class NullDataStore : IRegionDataStore
|
public class NullDataStore : ISimulationDataStore
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue