diff options
author | Justin Clarke Casey | 2008-06-16 17:13:28 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-06-16 17:13:28 +0000 |
commit | e31de6707fe6296cbfe3ee5765b48eef42828541 (patch) | |
tree | dc8536374b079eb29ebc39b3e45fa1cce5924418 /OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs | |
parent | change some messages on the migrations front to be (diff) | |
download | opensim-SC-e31de6707fe6296cbfe3ee5765b48eef42828541.zip opensim-SC-e31de6707fe6296cbfe3ee5765b48eef42828541.tar.gz opensim-SC-e31de6707fe6296cbfe3ee5765b48eef42828541.tar.bz2 opensim-SC-e31de6707fe6296cbfe3ee5765b48eef42828541.tar.xz |
* refactor: Fission ArchiveWriteRequest into prepare and execute classes
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs index 2021b70..f41be49 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs | |||
@@ -41,6 +41,11 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
41 | class AssetsRequest | 41 | class AssetsRequest |
42 | { | 42 | { |
43 | /// <summary> | 43 | /// <summary> |
44 | /// uuids to request | ||
45 | /// </summary> | ||
46 | protected ICollection<LLUUID> m_uuids; | ||
47 | |||
48 | /// <summary> | ||
44 | /// Callback used when all the assets requested have been received. | 49 | /// Callback used when all the assets requested have been received. |
45 | /// </summary> | 50 | /// </summary> |
46 | protected AssetsRequestCallback m_assetsRequestCallback; | 51 | protected AssetsRequestCallback m_assetsRequestCallback; |
@@ -60,17 +65,21 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
60 | /// </summary> | 65 | /// </summary> |
61 | protected AssetCache m_assetCache; | 66 | protected AssetCache m_assetCache; |
62 | 67 | ||
63 | protected internal AssetsRequest(AssetsRequestCallback assetsRequestCallback, AssetCache assetCache, ICollection<LLUUID> uuids) | 68 | protected internal AssetsRequest(ICollection<LLUUID> uuids, AssetCache assetCache, AssetsRequestCallback assetsRequestCallback) |
64 | { | 69 | { |
70 | m_uuids = uuids; | ||
65 | m_assetsRequestCallback = assetsRequestCallback; | 71 | m_assetsRequestCallback = assetsRequestCallback; |
66 | m_assetCache = assetCache; | 72 | m_assetCache = assetCache; |
67 | m_repliesRequired = uuids.Count; | 73 | m_repliesRequired = uuids.Count; |
68 | 74 | } | |
75 | |||
76 | protected internal void Execute() | ||
77 | { | ||
69 | // We can stop here if there are no assets to fetch | 78 | // We can stop here if there are no assets to fetch |
70 | if (m_repliesRequired == 0) | 79 | if (m_repliesRequired == 0) |
71 | m_assetsRequestCallback(m_assets); | 80 | m_assetsRequestCallback(m_assets); |
72 | 81 | ||
73 | foreach (LLUUID uuid in uuids) | 82 | foreach (LLUUID uuid in m_uuids) |
74 | { | 83 | { |
75 | m_assetCache.GetAsset(uuid, AssetRequestCallback, true); | 84 | m_assetCache.GetAsset(uuid, AssetRequestCallback, true); |
76 | } | 85 | } |