mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 04:05:42 +08:00
Thanks, sempuki, for a patch that moves all grid plugins to new PluginLoader (issue 1763).
This commit is contained in:
@@ -33,12 +33,18 @@ using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using libsecondlife;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using OpenSim.Framework;
|
||||
|
||||
[assembly : Addin]
|
||||
[assembly : AddinDependency("OpenSim.Data", "0.5")]
|
||||
|
||||
namespace OpenSim.Data.MSSQL
|
||||
{
|
||||
/// <summary>
|
||||
/// A grid data interface for MSSQL Server
|
||||
/// </summary>
|
||||
[Extension("/OpenSim/GridDataStore")]
|
||||
public class MSSQLGridData : GridDataBase
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
@@ -50,6 +56,12 @@ namespace OpenSim.Data.MSSQL
|
||||
|
||||
private string m_regionsTableName;
|
||||
|
||||
override public void Initialise()
|
||||
{
|
||||
m_log.Info("[MSSQLGridData]: " + Name + " cannot be default-initialized!");
|
||||
throw new PluginNotInitialisedException (Name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialises the Grid Interface
|
||||
/// </summary>
|
||||
@@ -101,7 +113,7 @@ namespace OpenSim.Data.MSSQL
|
||||
/// <summary>
|
||||
/// Shuts down the grid interface
|
||||
/// </summary>
|
||||
override public void Close()
|
||||
override public void Dispose()
|
||||
{
|
||||
// nothing to close
|
||||
}
|
||||
@@ -110,18 +122,18 @@ namespace OpenSim.Data.MSSQL
|
||||
/// The name of this DB provider.
|
||||
/// </summary>
|
||||
/// <returns>A string containing the storage system name</returns>
|
||||
override public string getName()
|
||||
override public string Name
|
||||
{
|
||||
return "Sql OpenGridData";
|
||||
get { return "Sql OpenGridData"; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Database provider version.
|
||||
/// </summary>
|
||||
/// <returns>A string containing the storage system version</returns>
|
||||
override public string getVersion()
|
||||
override public string Version
|
||||
{
|
||||
return "0.1";
|
||||
get { return "0.1"; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -25,21 +25,39 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using OpenSim.Framework;
|
||||
|
||||
// Only one attribute per assembly. See: *GridData.cs
|
||||
// [assembly : Addin]
|
||||
// [assembly : AddinDependency("OpenSim.Data", "0.5")]
|
||||
|
||||
namespace OpenSim.Data.MSSQL
|
||||
{
|
||||
/// <summary>
|
||||
/// An interface to the log database for MSSQL
|
||||
/// </summary>
|
||||
internal class MSSQLLogData : ILogData
|
||||
[Extension("/OpenSim/GridLogData")]
|
||||
internal class MSSQLLogData : ILogDataPlugin
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// The database manager
|
||||
/// </summary>
|
||||
public MSSQLManager database;
|
||||
|
||||
public void Initialise()
|
||||
{
|
||||
m_log.Info("[MSSQLLogData]: " + Name + " cannot be default-initialized!");
|
||||
throw new PluginNotInitialisedException (Name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Artificial constructor called when the plugin is loaded
|
||||
/// </summary>
|
||||
@@ -97,15 +115,15 @@ namespace OpenSim.Data.MSSQL
|
||||
/// Returns the name of this DB provider
|
||||
/// </summary>
|
||||
/// <returns>A string containing the DB provider name</returns>
|
||||
public string getName()
|
||||
public string Name
|
||||
{
|
||||
return "MSSQL Logdata Interface";
|
||||
get { return "MSSQL Logdata Interface"; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Closes the database provider
|
||||
/// </summary>
|
||||
public void Close()
|
||||
public void Dispose()
|
||||
{
|
||||
// Do nothing.
|
||||
}
|
||||
@@ -114,9 +132,9 @@ namespace OpenSim.Data.MSSQL
|
||||
/// Returns the version of this DB provider
|
||||
/// </summary>
|
||||
/// <returns>A string containing the provider version</returns>
|
||||
public string getVersion()
|
||||
public string Version
|
||||
{
|
||||
return "0.1";
|
||||
get { return "0.1"; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user