/// <summary> /// Start the archive. /// </summary> /// <param name="archive">The <see cref="PartitionArchive"/> to start.</param> public override void Start(PartitionArchive archive) { HsmPath = string.Empty; PartitionArchive = archive; LoadServerPartition(); //Hsm Archive specific Xml data. XmlElement element = archive.ConfigurationXml.DocumentElement; if (element != null) { foreach (XmlElement node in element.ChildNodes) { if (node.Name.Equals("RootDir")) { HsmPath = node.InnerText; } } } // Start the restore service _restoreService = new HsmRestoreService("HSM Restore", this); _restoreService.StartService(); // If not "readonly", start the archive service. if (!PartitionArchive.ReadOnly) { _archiveService = new HsmArchiveService("HSM Archive", this); _archiveService.StartService(); } }
/// <summary> /// Stop the archive. /// </summary> public override void Stop() { if (_restoreService != null) { _restoreService.StopService(); _restoreService = null; } if (_archiveService != null) { _archiveService.StopService(); _archiveService = null; } }