* remove unused CommitAssets() hook for now

0.6.0-stable
Justin Clarke Casey 2008-07-07 19:18:44 +00:00
parent 0b2fcbfec4
commit 1813946937
10 changed files with 1 additions and 53 deletions

View File

@ -36,7 +36,6 @@ namespace OpenSim.Data
public abstract void CreateAsset(AssetBase asset); public abstract void CreateAsset(AssetBase asset);
public abstract void UpdateAsset(AssetBase asset); public abstract void UpdateAsset(AssetBase asset);
public abstract bool ExistsAsset(LLUUID uuid); public abstract bool ExistsAsset(LLUUID uuid);
public abstract void CommitAssets();
public abstract string Version { get; } public abstract string Version { get; }
public abstract string Name { get; } public abstract string Name { get; }

View File

@ -203,13 +203,6 @@ namespace OpenSim.Data.MSSQL
return false; return false;
} }
/// <summary>
/// All writes are immediately commited to the database, so this is a no-op
/// </summary>
override public void CommitAssets()
{
}
#endregion #endregion
#region IPlugin Members #region IPlugin Members

View File

@ -304,13 +304,6 @@ namespace OpenSim.Data.MySQL
return assetExists; return assetExists;
} }
/// <summary>
/// All writes are immediately commited to the database, so this is a no-op
/// </summary>
override public void CommitAssets()
{
}
#endregion #endregion
/// <summary> /// <summary>

View File

@ -161,12 +161,6 @@ namespace OpenSim.Data.NHibernate
} }
override public void CommitAssets() // force a sync to the database
{
m_log.Info("[SQLITE]: Attempting commit");
}
public override string Name { public override string Name {
get { return "NHibernate"; } get { return "NHibernate"; }
} }

View File

@ -223,19 +223,6 @@ namespace OpenSim.Data.SQLite
} }
} }
/// <summary>
/// commit
/// </summary>
override public void CommitAssets() // force a sync to the database
{
m_log.Info("[ASSET DB]: Attempting commit");
// lock (ds)
// {
// da.Update(ds, "assets");
// ds.AcceptChanges();
// }
}
/*********************************************************************** /***********************************************************************
* *
* Database Definition Functions * Database Definition Functions

View File

@ -50,7 +50,6 @@ namespace OpenSim.Framework.Communications.Cache
protected IAssetLoader assetLoader = new AssetLoaderFileSystem(); protected IAssetLoader assetLoader = new AssetLoaderFileSystem();
protected abstract void StoreAsset(AssetBase asset); protected abstract void StoreAsset(AssetBase asset);
protected abstract void CommitAssets();
/// <summary> /// <summary>
/// This method must be implemented by a subclass to retrieve the asset named in the /// This method must be implemented by a subclass to retrieve the asset named in the
@ -108,8 +107,6 @@ namespace OpenSim.Framework.Communications.Cache
m_log.Info("[ASSET SERVER]: Setting up asset database"); m_log.Info("[ASSET SERVER]: Setting up asset database");
assetLoader.ForEachDefaultXmlAsset(StoreAsset); assetLoader.ForEachDefaultXmlAsset(StoreAsset);
CommitAssets();
} }
public AssetServerBase() public AssetServerBase()
@ -167,7 +164,6 @@ namespace OpenSim.Framework.Communications.Cache
lock (m_syncLock) lock (m_syncLock)
{ {
m_assetProvider.UpdateAsset(asset); m_assetProvider.UpdateAsset(asset);
m_assetProvider.CommitAssets();
} }
} }
@ -176,7 +172,6 @@ namespace OpenSim.Framework.Communications.Cache
lock (m_syncLock) lock (m_syncLock)
{ {
StoreAsset(asset); StoreAsset(asset);
CommitAssets();
} }
} }

View File

@ -106,10 +106,6 @@ namespace OpenSim.Framework.Communications.Cache
} }
} }
protected override void CommitAssets()
{
}
public override void Close() public override void Close()
{ {
throw new Exception("The method or operation is not implemented."); throw new Exception("The method or operation is not implemented.");

View File

@ -74,8 +74,6 @@ namespace OpenSim.Framework.Communications.Cache
public override void Close() public override void Close()
{ {
base.Close(); base.Close();
m_assetProvider.CommitAssets();
} }
protected override AssetBase GetAsset(AssetRequest req) protected override AssetBase GetAsset(AssetRequest req)
@ -93,10 +91,5 @@ namespace OpenSim.Framework.Communications.Cache
{ {
m_assetProvider.CreateAsset(asset); m_assetProvider.CreateAsset(asset);
} }
protected override void CommitAssets()
{
m_assetProvider.CommitAssets();
}
} }
} }

View File

@ -35,7 +35,6 @@ namespace OpenSim.Framework
void CreateAsset(AssetBase asset); void CreateAsset(AssetBase asset);
void UpdateAsset(AssetBase asset); void UpdateAsset(AssetBase asset);
bool ExistsAsset(LLUUID uuid); bool ExistsAsset(LLUUID uuid);
void CommitAssets(); // force a sync to the database
void Initialise(string connect); void Initialise(string connect);
} }
} }

View File

@ -136,9 +136,8 @@ namespace OpenSim.Grid.AssetServer
XmlSerializer xs = new XmlSerializer(typeof (AssetBase)); XmlSerializer xs = new XmlSerializer(typeof (AssetBase));
AssetBase asset = (AssetBase) xs.Deserialize(request); AssetBase asset = (AssetBase) xs.Deserialize(request);
m_log.InfoFormat("[REST]: StoreAndCommitAsset {0}", asset.FullID); m_log.InfoFormat("[REST]: Creating asset {0}", asset.FullID);
m_assetProvider.CreateAsset(asset); m_assetProvider.CreateAsset(asset);
m_assetProvider.CommitAssets();
return new byte[] {}; return new byte[] {};
} }