* minor: Remove some of the redundant asset id storage for now

0.6.0-stable
Justin Clarke Casey 2008-09-21 20:44:54 +00:00
parent 8fb3523ef7
commit 3782d6aab7
1 changed files with 12 additions and 11 deletions

View File

@ -253,7 +253,7 @@ namespace OpenSim.Framework.Communications.Cache
{ {
// m_log.DebugFormat("[ASSET CACHE]: Adding request for {0} {1}", isTexture ? "texture" : "asset", assetId); // m_log.DebugFormat("[ASSET CACHE]: Adding request for {0} {1}", isTexture ? "texture" : "asset", assetId);
NewAssetRequest req = new NewAssetRequest(assetId, callback); NewAssetRequest req = new NewAssetRequest(callback);
AssetRequestsList requestList; AssetRequestsList requestList;
lock (RequestLists) lock (RequestLists)
@ -267,7 +267,7 @@ namespace OpenSim.Framework.Communications.Cache
else else
{ {
// m_log.DebugFormat("[ASSET CACHE]: Adding request for {0} {1}", isTexture ? "texture" : "asset", assetId); // m_log.DebugFormat("[ASSET CACHE]: Adding request for {0} {1}", isTexture ? "texture" : "asset", assetId);
requestList = new AssetRequestsList(assetId); requestList = new AssetRequestsList();
requestList.TimeRequested = DateTime.Now; requestList.TimeRequested = DateTime.Now;
requestList.Requests.Add(req); requestList.Requests.Add(req);
@ -675,30 +675,31 @@ namespace OpenSim.Framework.Communications.Cache
} }
} }
/// <summary>
/// A list of requests for a particular asset.
/// </summary>
public class AssetRequestsList public class AssetRequestsList
{ {
public UUID AssetID; /// <summary>
/// A list of requests for assets
/// </summary>
public List<NewAssetRequest> Requests = new List<NewAssetRequest>(); public List<NewAssetRequest> Requests = new List<NewAssetRequest>();
/// <summary> /// <summary>
/// Record the time that this request was first made. /// Record the time that this request was first made.
/// </summary> /// </summary>
public DateTime TimeRequested; public DateTime TimeRequested;
public AssetRequestsList(UUID assetID)
{
AssetID = assetID;
}
} }
/// <summary>
/// Represent a request for an asset that has yet to be fulfilled.
/// </summary>
public class NewAssetRequest public class NewAssetRequest
{ {
public UUID AssetID;
public AssetRequestCallback Callback; public AssetRequestCallback Callback;
public NewAssetRequest(UUID assetID, AssetRequestCallback callback) public NewAssetRequest(AssetRequestCallback callback)
{ {
AssetID = assetID;
Callback = callback; Callback = callback;
} }
} }