diff options
author | Justin Clarke Casey | 2009-01-30 20:54:38 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-01-30 20:54:38 +0000 |
commit | c307e0e4a7ddf0b07f2b0662fe55adc31b64b393 (patch) | |
tree | 3206f4a7aa0d00ad5256599eb457de0ce608fcc6 /OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs | |
parent | * furhter simplify test setups for objects (diff) | |
download | opensim-SC_OLD-c307e0e4a7ddf0b07f2b0662fe55adc31b64b393.zip opensim-SC_OLD-c307e0e4a7ddf0b07f2b0662fe55adc31b64b393.tar.gz opensim-SC_OLD-c307e0e4a7ddf0b07f2b0662fe55adc31b64b393.tar.bz2 opensim-SC_OLD-c307e0e4a7ddf0b07f2b0662fe55adc31b64b393.tar.xz |
* Extend archive save test to check for the presence of the file for the object that was in the scene
* Can now pass in a wait handle to ArchiveRegion() if you want same thread signalling that the save has completed
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs index bade121..8eec38d 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs | |||
@@ -29,6 +29,7 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.IO; | 30 | using System.IO; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using System.Threading; | ||
32 | using System.Xml; | 33 | using System.Xml; |
33 | using OpenMetaverse; | 34 | using OpenMetaverse; |
34 | using log4net; | 35 | using log4net; |
@@ -57,19 +58,22 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
57 | protected List<SceneObjectGroup> m_sceneObjects; | 58 | protected List<SceneObjectGroup> m_sceneObjects; |
58 | protected RegionInfo m_regionInfo; | 59 | protected RegionInfo m_regionInfo; |
59 | protected Stream m_saveStream; | 60 | protected Stream m_saveStream; |
61 | protected EventWaitHandle m_signalWhenDoneEvent; | ||
60 | 62 | ||
61 | public ArchiveWriteRequestExecution( | 63 | public ArchiveWriteRequestExecution( |
62 | List<SceneObjectGroup> sceneObjects, | 64 | List<SceneObjectGroup> sceneObjects, |
63 | ITerrainModule terrainModule, | 65 | ITerrainModule terrainModule, |
64 | IRegionSerialiserModule serialiser, | 66 | IRegionSerialiserModule serialiser, |
65 | RegionInfo regionInfo, | 67 | RegionInfo regionInfo, |
66 | Stream saveStream) | 68 | Stream saveStream, |
69 | EventWaitHandle signalWhenDoneEvent) | ||
67 | { | 70 | { |
68 | m_sceneObjects = sceneObjects; | 71 | m_sceneObjects = sceneObjects; |
69 | m_terrainModule = terrainModule; | 72 | m_terrainModule = terrainModule; |
70 | m_serialiser = serialiser; | 73 | m_serialiser = serialiser; |
71 | m_regionInfo = regionInfo; | 74 | m_regionInfo = regionInfo; |
72 | m_saveStream = saveStream; | 75 | m_saveStream = saveStream; |
76 | m_signalWhenDoneEvent = signalWhenDoneEvent; | ||
73 | } | 77 | } |
74 | 78 | ||
75 | protected internal void ReceivedAllAssets(IDictionary<UUID, AssetBase> assetsFound, ICollection<UUID> assetsNotFoundUuids) | 79 | protected internal void ReceivedAllAssets(IDictionary<UUID, AssetBase> assetsFound, ICollection<UUID> assetsNotFoundUuids) |
@@ -126,6 +130,9 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
126 | archive.WriteTar(m_saveStream); | 130 | archive.WriteTar(m_saveStream); |
127 | 131 | ||
128 | m_log.InfoFormat("[ARCHIVER]: Wrote out OpenSimulator archive for {0}", m_regionInfo.RegionName); | 132 | m_log.InfoFormat("[ARCHIVER]: Wrote out OpenSimulator archive for {0}", m_regionInfo.RegionName); |
133 | |||
134 | if (m_signalWhenDoneEvent != null) | ||
135 | m_signalWhenDoneEvent.Set(); | ||
129 | } | 136 | } |
130 | 137 | ||
131 | /// <summary> | 138 | /// <summary> |