Connect up the new asset cache and introduce an asynchronous call path

for asset retrieval (full asset only) to ease migration to the new system
This commit is contained in:
Melanie Thielker
2009-05-10 14:03:06 +00:00
parent d8e1842d25
commit 1a910b6e1d
6 changed files with 223 additions and 32 deletions

View File

@@ -94,6 +94,20 @@ namespace OpenSim.Services.AssetService
return asset.Data;
}
public bool Get(string id, Object sender, AssetRetrieved handler)
{
UUID assetID;
if (!UUID.TryParse(id, out assetID))
return false;
AssetBase asset = m_Database.FetchAsset(assetID);
handler(id, sender, asset);
return true;
}
public string Store(AssetBase asset)
{
m_Database.CreateAsset(asset);