aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-11-05 19:36:53 +0000
committerJustin Clark-Casey (justincc)2014-11-25 23:23:11 +0000
commit06a5d6e9ef163abaadbf81c98b54c042751fae89 (patch)
tree535d0f508e2844326cacefb3f40db670fd11f5b7 /OpenSim/Region/CoreModules
parentAdd incoming packet async handling engine to queue some inbound udp async req... (diff)
downloadopensim-SC_OLD-06a5d6e9ef163abaadbf81c98b54c042751fae89.zip
opensim-SC_OLD-06a5d6e9ef163abaadbf81c98b54c042751fae89.tar.gz
opensim-SC_OLD-06a5d6e9ef163abaadbf81c98b54c042751fae89.tar.bz2
opensim-SC_OLD-06a5d6e9ef163abaadbf81c98b54c042751fae89.tar.xz
Introduce an IteratingUuidGatherer where each fetch from the asset service (iteration) can be controlled by the caller.
This is to enable an imminent change where incoming HG scene object fetching can assess the time taken by each request rather than being forced to perform all requests in one call. Soon, this will replace the existing UuidGatherer since it is both simpler and more flexible.
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs19
1 files changed, 16 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
index 522de79..be409bb 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
@@ -571,9 +571,22 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
571 "[HG ENTITY TRANSFER MODULE]: Incoming attachment {0} for HG user {1} with asset server {2}", 571 "[HG ENTITY TRANSFER MODULE]: Incoming attachment {0} for HG user {1} with asset server {2}",
572 so.Name, so.AttachedAvatar, url); 572 so.Name, so.AttachedAvatar, url);
573 573
574 Dictionary<UUID, sbyte> ids = new Dictionary<UUID, sbyte>(); 574 IteratingHGUuidGatherer uuidGatherer = new IteratingHGUuidGatherer(Scene.AssetService, url);
575 HGUuidGatherer uuidGatherer = new HGUuidGatherer(Scene.AssetService, url); 575 uuidGatherer.RecordAssetUuids(so);
576 uuidGatherer.GatherAssetUuids(so, ids); 576
577 // XXX: We will shortly use this iterating mechanism to check if a fetch is taking too long
578 // but just for now we will simply fetch everything. If this was permanent could use
579 // GatherAll()
580 while (uuidGatherer.GatherNext())
581 m_log.DebugFormat(
582 "[HG ENTITY TRANSFER]: Gathered attachment {0} for HG user {1} with asset server {2}",
583 so.Name, so.OwnerID, url);
584
585 IDictionary<UUID, sbyte> ids = uuidGatherer.GetGatheredUuids();
586
587 m_log.DebugFormat(
588 "[HG ENTITY TRANSFER]: Fetching {0} assets for attachment {1} for HG user {2} with asset server {3}",
589 ids.Count, so.Name, so.OwnerID, url);
577 590
578 foreach (KeyValuePair<UUID, sbyte> kvp in ids) 591 foreach (KeyValuePair<UUID, sbyte> kvp in ids)
579 uuidGatherer.FetchAsset(kvp.Key); 592 uuidGatherer.FetchAsset(kvp.Key);