Make the IteratingUuidGatherer the only UuidGatherer.

This UUID gatherer provides a superset of the previous gatherer's functionality
as it also allows the caller to control gathering iterations for load purposes.
This commit is contained in:
Justin Clark-Casey (justincc)
2015-01-08 20:21:40 +00:00
parent 9dc4b2c479
commit 08606ae409
8 changed files with 112 additions and 713 deletions

View File

@@ -93,11 +93,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
/// </value>
protected UUID m_id;
/// <value>
/// Used to collect the uuids of the assets that we need to save into the archive
/// </value>
protected Dictionary<UUID, sbyte> m_assetUuids = new Dictionary<UUID, sbyte>();
/// <value>
/// Used to collect the uuids of the users that we need to save into the archive
/// </value>
@@ -225,7 +220,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
// Don't chase down link asset items as they actually point to their target item IDs rather than an asset
if (SaveAssets && itemAssetType != AssetType.Link && itemAssetType != AssetType.LinkFolder)
m_assetGatherer.GatherAssetUuids(inventoryItem.AssetID, (sbyte)inventoryItem.AssetType, m_assetUuids);
m_assetGatherer.AddForInspection(inventoryItem.AssetID);
}
/// <summary>
@@ -422,12 +417,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (SaveAssets)
{
m_log.DebugFormat("[INVENTORY ARCHIVER]: Saving {0} assets for items", m_assetUuids.Count);
m_assetGatherer.GatherAll();
m_log.DebugFormat(
"[INVENTORY ARCHIVER]: Saving {0} assets for items", m_assetGatherer.GatheredUuids.Count);
AssetsRequest ar
= new AssetsRequest(
new AssetsArchiver(m_archiveWriter),
m_assetUuids, m_scene.AssetService,
m_assetGatherer.GatheredUuids, m_scene.AssetService,
m_scene.UserAccountService, m_scene.RegionInfo.ScopeID,
options, ReceivedAllAssets);