diff options
author | Justin Clarke Casey | 2009-01-23 17:07:37 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-01-23 17:07:37 +0000 |
commit | ddff7ab20e32664e09f06668f6e6250ea3b3abf7 (patch) | |
tree | 6dd80617df340bb3a9cff3d922c8809d7c4413ba /OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs | |
parent | * Adds a synchronous jpeg decode for pre-caching purposes (diff) | |
download | opensim-SC_OLD-ddff7ab20e32664e09f06668f6e6250ea3b3abf7.zip opensim-SC_OLD-ddff7ab20e32664e09f06668f6e6250ea3b3abf7.tar.gz opensim-SC_OLD-ddff7ab20e32664e09f06668f6e6250ea3b3abf7.tar.bz2 opensim-SC_OLD-ddff7ab20e32664e09f06668f6e6250ea3b3abf7.tar.xz |
* Add direct stream loading and saving methods to the archive module.
* The async stream method does not yet signal completion to interested calling code
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs index b410e55..36d5eb5 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs | |||
@@ -28,7 +28,6 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.IO; | 30 | using System.IO; |
31 | using System.IO.Compression; | ||
32 | using System.Reflection; | 31 | using System.Reflection; |
33 | using System.Xml; | 32 | using System.Xml; |
34 | using OpenMetaverse; | 33 | using OpenMetaverse; |
@@ -57,20 +56,20 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
57 | protected IRegionSerialiserModule m_serialiser; | 56 | protected IRegionSerialiserModule m_serialiser; |
58 | protected List<SceneObjectGroup> m_sceneObjects; | 57 | protected List<SceneObjectGroup> m_sceneObjects; |
59 | protected RegionInfo m_regionInfo; | 58 | protected RegionInfo m_regionInfo; |
60 | protected string m_savePath; | 59 | protected Stream m_saveStream; |
61 | 60 | ||
62 | public ArchiveWriteRequestExecution( | 61 | public ArchiveWriteRequestExecution( |
63 | List<SceneObjectGroup> sceneObjects, | 62 | List<SceneObjectGroup> sceneObjects, |
64 | ITerrainModule terrainModule, | 63 | ITerrainModule terrainModule, |
65 | IRegionSerialiserModule serialiser, | 64 | IRegionSerialiserModule serialiser, |
66 | RegionInfo regionInfo, | 65 | RegionInfo regionInfo, |
67 | string savePath) | 66 | Stream saveStream) |
68 | { | 67 | { |
69 | m_sceneObjects = sceneObjects; | 68 | m_sceneObjects = sceneObjects; |
70 | m_terrainModule = terrainModule; | 69 | m_terrainModule = terrainModule; |
71 | m_serialiser = serialiser; | 70 | m_serialiser = serialiser; |
72 | m_regionInfo = regionInfo; | 71 | m_regionInfo = regionInfo; |
73 | m_savePath = savePath; | 72 | m_saveStream = saveStream; |
74 | } | 73 | } |
75 | 74 | ||
76 | protected internal void ReceivedAllAssets(IDictionary<UUID, AssetBase> assetsFound, ICollection<UUID> assetsNotFoundUuids) | 75 | protected internal void ReceivedAllAssets(IDictionary<UUID, AssetBase> assetsFound, ICollection<UUID> assetsNotFoundUuids) |
@@ -124,9 +123,10 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
124 | AssetsArchiver assetsArchiver = new AssetsArchiver(assetsFound); | 123 | AssetsArchiver assetsArchiver = new AssetsArchiver(assetsFound); |
125 | assetsArchiver.Archive(archive); | 124 | assetsArchiver.Archive(archive); |
126 | 125 | ||
127 | archive.WriteTar(new GZipStream(new FileStream(m_savePath, FileMode.Create), CompressionMode.Compress)); | 126 | archive.WriteTar(m_saveStream); |
128 | 127 | ||
129 | m_log.InfoFormat("[ARCHIVER]: Wrote out OpenSimulator archive {0}", m_savePath); | 128 | // m_log.InfoFormat("[ARCHIVER]: Wrote out OpenSimulator archive for {0}", m_regionInfo.RegionName); |
129 | m_log.InfoFormat("[ARCHIVER]: Wrote out OpenSimulator archive for {0}", m_saveStream); | ||
130 | } | 130 | } |
131 | 131 | ||
132 | /// <summary> | 132 | /// <summary> |