private void WriteData(DataSlice slice) { string fileName; if (slice.Data != null) { try { if (slice.SliceHeader.ContentType == Common.Recovery.DataSliceType.Data) { fileName = slice.SliceHeader.Database; } else { fileName = RecoveryFolderStructure.CONFIG_SERVER; } BackupFile file = Context.GetBackupFile(fileName); if (file != null) { file.SaveDataSlice(slice); } else { throw new NullReferenceException("File " + fileName + " cannot be null"); } } catch (Exception exp) { if (LoggerManager.Instance.RecoveryLogger != null && LoggerManager.Instance.RecoveryLogger.IsErrorEnabled) { LoggerManager.Instance.RecoveryLogger.Error("RecoveryIOWriter.Write()", exp.ToString()); } } } }
//M_TODO: method that provides files for data consumption // GetFile(role) i.e. oplog file, db file internal PersistenceContext() { _backupFile = new List <BackupFile>(); _activeFile = null; }