public BackupHistoryTests() { _time = new MockTimeManager(DateTime.UnixEpoch); _fs = new MockFileManager(_time); _history = new DefaultHistoryProvider(_time, 3); _backup = new BackupManager(_fs, _fs, _history, null, null); }
public RestoreBackupServer(ICsConfigurationProvider cfgProvider, IBackupManager backupManager, IMediator mediator) { this.backupManager = backupManager; this.cfgProvider = cfgProvider; this.mediator = mediator; }
/// <summary> /// Creates a new instance /// </summary> /// <param name="backupManager">An backup manager object that handles the restoring and creating of backups.</param> public AutoBackupManager(IBackupManager backupManager, GlobalBusyIndicatorState globalBusyIndicatorState, ISettingsManager settingsManager) { this.backupManager = backupManager; this.globalBusyIndicatorState = globalBusyIndicatorState; this.settingsManager = settingsManager; }
public BackupViewModel(IBackupManager backupManager, IDialogService dialogService, IConnectivity connectivity) { this.backupManager = backupManager; this.dialogService = dialogService; this.connectivity = connectivity; }
public BackupResponse Backup(IndexingActivityStatus state, string backupDirectoryPath) { if (backupDirectoryPath == null) { SnTrace.Index.WriteError("SearchService: Missing 'backupDirectoryPath'"); throw new ArgumentNullException(nameof(backupDirectoryPath)); } if (_backupManager != null) { SnTrace.Index.Write("SearchService: Backup already executing by another thread."); return(CreateBackupResponse(BackupState.Executing, false)); } lock (_backupLock) { if (_backupManager != null) { return(CreateBackupResponse(BackupState.Executing, false)); } _backupManager = _backupManagerFactory.CreateBackupManager(); } SnTrace.Index.Write("SearchService: BackupManager created."); Task.Run(() => BackupWorker(state, backupDirectoryPath)); return(CreateBackupResponse(BackupState.Started, false)); }
public void Open( RecoveredOrCopiedCheckpointLsn recoveredOrCopiedCheckpointLsn, RoleContextDrainState roleContextDrainState, OperationProcessor recordsProcessor, IStateReplicator fabricReplicator, IBackupManager backupManager, CheckpointManager checkpointManager, TransactionManager transactionManager, ReplicatedLogManager replicatedLogManager, IStateManager stateManager, TransactionalReplicatorSettings replicatorSettings, RecoveryManager recoveryManager, ITracer tracer) { this.recoveredOrCopiedCheckpointLsn = recoveredOrCopiedCheckpointLsn; this.recoveryManager = recoveryManager; this.replicatorSettings = replicatorSettings; this.stateManager = stateManager; this.tracer = tracer; this.roleContextDrainState = roleContextDrainState; this.recordsProcessor = recordsProcessor; this.fabricReplicator = fabricReplicator; this.backupManager = backupManager; this.transactionManager = transactionManager; this.checkpointManager = checkpointManager; this.replicatedLogManager = replicatedLogManager; }
public BackupViewModel(IBackupManager backupManager, IDialogService dialogService, IConnectivity connectivity) { this.backupManager = backupManager; this.dialogService = dialogService; this.connectivity = connectivity; }
public ModifyCategoryViewModel(ICategoryService categoryService, IDialogService dialogService, ISettingsManager settingsManager, IBackupManager backupManager) { this.categoryService = categoryService; this.dialogService = dialogService; this.settingsManager = settingsManager; this.backupManager = backupManager; }
internal Settings(MainWindow app) { mainWindow = app; Logger = new LogViaInAppListBox(this.mainWindow); DataSaver = new SaveDataToTextFile(this.mainWindow); DataLoader = new LoadDataFromTextFile(this.mainWindow); BackupManager = new BackupViaFileCopying(this.mainWindow); MarkedFilesDisplayer = new DisplayMarkedFilesViaInAppListBox(this.mainWindow); }
public ModifyAccountViewModel(IAccountRepository accountRepository, IDialogService dialogService, ISettingsManager settingsManager, IBackupManager backupManager) { this.dialogService = dialogService; this.settingsManager = settingsManager; this.backupManager = backupManager; this.accountRepository = accountRepository; }
public ShowService(StatefulServiceContext serviceContext, IReliableStateManagerReplica reliableStateManagerReplica) : base(serviceContext, reliableStateManagerReplica) { _showRepository = new ShowRepository(StateManager); _backupManager = new BackupManager( new ServiceContextInfo(Context, Partition, StateManager), new BackupContextInfo(BackupAsync, "showRequestHistory", "showBackupCountDict")); }
public ModifyCategoryViewModel(ICategoryRepository categoryRepository, IDialogService dialogService, ISettingsManager settingsManager, IBackupManager backupManager) { this.categoryRepository = categoryRepository; this.dialogService = dialogService; this.settingsManager = settingsManager; this.backupManager = backupManager; }
public ModifyAccountViewModel(IAccountService accountService, ISettingsManager settingsManager, IBackupManager backupManager, IDialogService dialogService) { this.dialogService = dialogService; this.settingsManager = settingsManager; this.backupManager = backupManager; this.accountService = accountService; }
public BackupViewModel(IBackupManager backupManager, IDialogService dialogService, IConnectivity connectivity, ISettingsManager settingsManager) { this.backupManager = backupManager; this.dialogService = dialogService; this.connectivity = connectivity; this.settingsManager = settingsManager; }
public BackupViewModel(IBackupManager backupManager, IDialogService dialogService, IConnectivity connectivity, ISettingsManager settingsManager) { this.backupManager = backupManager; this.dialogService = dialogService; this.connectivity = connectivity; this.settingsManager = settingsManager; }
public ReservationService(StatefulServiceContext serviceContext, IReliableStateManagerReplica reliableStateManagerReplica, IServiceFactory <IShowService> showServiceFactory) : base(serviceContext, reliableStateManagerReplica) { _reservationRepository = new ReservationRepository(StateManager); _showServiceFactory = showServiceFactory; _backupManager = new BackupManager( new ServiceContextInfo(Context, Partition, StateManager), new BackupContextInfo(BackupAsync, "reservationRequestHistory", "reservationBackupCountDict")); }
/// <summary> /// Constructor /// </summary> public ModifyCategoryViewModel(ICategoryService categoryService, IDialogService dialogService, ISettingsManager settingsManager, IBackupManager backupManager, IMvxLogProvider logProvider, IMvxNavigationService navigationService) : base(logProvider, navigationService) { this.categoryService = categoryService; this.dialogService = dialogService; this.settingsManager = settingsManager; this.backupManager = backupManager; }
public BackupController(CancellationToken cancel, IBackupManager backupmgr, INameService namesvc, IPersistentStorage pstore, ITaskQueue taskqueue) { this.m_backupmgr = backupmgr; this.m_cancel = cancel; this.m_dmc = Global.CloudStorage as DynamicMemoryCloud; this.m_namesvc = namesvc; this.m_pstore = pstore; this.m_taskqueue = taskqueue; m_backupmgr.RequestPartitionBackup += OnBackupManagerRequestBackup; m_backupmgr.RequestPartitionRestore += OnBackupManagerRequestRestore; }
public BackupViewModel(IBackupManager backupManager, IDialogService dialogService, IConnectivity connectivity, ISettingsManager settingsManager, IMvxLogProvider logProvider, IMvxNavigationService navigationService) : base(logProvider, navigationService) { this.backupManager = backupManager; this.dialogService = dialogService; this.connectivity = connectivity; this.settingsManager = settingsManager; }
public ModifyAccountViewModel(IAccountService accountService, ISettingsManager settingsManager, IBackupManager backupManager, IDialogService dialogService, IMvxLogProvider logProvider, IMvxNavigationService navigationService) : base(logProvider, navigationService) { this.dialogService = dialogService; this.navigationService = navigationService; this.settingsManager = settingsManager; this.backupManager = backupManager; this.accountService = accountService; this.logProvider = logProvider; }
public ModifyPaymentViewModel(IPaymentService paymentService, IAccountService accountService, IDialogService dialogService, ISettingsManager settingsManager, IMvxMessenger messenger, IBackupManager backupManager) { this.dialogService = dialogService; this.settingsManager = settingsManager; this.backupManager = backupManager; this.paymentService = paymentService; this.accountService = accountService; token = messenger.Subscribe <CategorySelectedMessage>(ReceiveMessage); }
public PaymentListViewModel(IAccountService accountService, IPaymentService paymentService, IDialogService dialogService, ISettingsManager settingsManager, IBalanceCalculationManager balanceCalculationManager, IBackupManager backupManager, IModifyDialogService modifyDialogService) { this.accountService = accountService; this.paymentService = paymentService; this.dialogService = dialogService; this.settingsManager = settingsManager; this.balanceCalculationManager = balanceCalculationManager; this.backupManager = backupManager; this.modifyDialogService = modifyDialogService; }
public PaymentListViewModel(IAccountRepository accountRepository, IPaymentRepository paymentRepository, IPaymentManager paymentManager, IDialogService dialogService, ISettingsManager settingsManager, IEndOfMonthManager endOfMonthManager, IBackupManager backupManager) { this.paymentManager = paymentManager; this.accountRepository = accountRepository; this.paymentRepository = paymentRepository; this.dialogService = dialogService; this.settingsManager = settingsManager; this.endOfMonthManager = endOfMonthManager; this.backupManager = backupManager; }
public ModifyPaymentViewModel(IPaymentRepository paymentRepository, IAccountRepository accountRepository, IDialogService dialogService, IPaymentManager paymentManager, ISettingsManager settingsManager, IMvxMessenger messenger, IBackupManager backupManager) { this.dialogService = dialogService; this.paymentManager = paymentManager; this.settingsManager = settingsManager; this.backupManager = backupManager; this.paymentRepository = paymentRepository; this.accountRepository = accountRepository; token = messenger.Subscribe<CategorySelectedMessage>(ReceiveMessage); }
public void Open( RecoveredOrCopiedCheckpointLsn recoveredOrCopiedCheckpointLsn, ITracer tracer, RoleContextDrainState roleContextDrainState, IBackupManager backupManager, IInternalVersionManager versionManager, CheckpointManager checkpointManager, IStateManager stateManager) { this.recoveredOrCopiedCheckpointLsn = recoveredOrCopiedCheckpointLsn; this.roleContextDrainState = roleContextDrainState; this.tracer = tracer; this.backupManager = backupManager; this.versionManager = versionManager; this.checkpointManager = checkpointManager; this.stateManager = stateManager; }
public PaymentListViewModel(IAccountRepository accountRepository, IPaymentRepository paymentRepository, IPaymentManager paymentManager, IDialogService dialogService, ISettingsManager settingsManager, IEndOfMonthManager endOfMonthManager, IBackupManager backupManager, IModifyDialogService modifyDialogService) { this.paymentManager = paymentManager; this.accountRepository = accountRepository; this.paymentRepository = paymentRepository; this.dialogService = dialogService; this.settingsManager = settingsManager; this.endOfMonthManager = endOfMonthManager; this.backupManager = backupManager; this.modifyDialogService = modifyDialogService; }
/// <summary> /// Default constructor /// </summary> public PaymentListViewModel(IAccountService accountService, IPaymentService paymentService, IDialogService dialogService, ISettingsManager settingsManager, IBalanceCalculationManager balanceCalculationManager, IBackupManager backupManager, IMvxNavigationService navigationService, IMvxMessenger messenger) { this.accountService = accountService; this.paymentService = paymentService; this.dialogService = dialogService; this.settingsManager = settingsManager; this.balanceCalculationManager = balanceCalculationManager; this.backupManager = backupManager; this.navigationService = navigationService; this.messenger = messenger; token = messenger.Subscribe <PaymentListFilterChangedMessage>(async message => await LoadPayments(message)); }
private void BackupWorker(IndexingActivityStatus state, string backupDirectoryPath) { try { _backupCancellationSource = new CancellationTokenSource(); _backupManager.Backup(state, backupDirectoryPath, SearchManager.Instance, _backupCancellationSource.Token); } catch (Exception e) { CollectErrorMessages(e, _backupManager.BackupInfo); SnTrace.Index.WriteError("SearchService: " + _backupManager.BackupInfo.Message); } _backupHistory.Add(_backupManager.BackupInfo.Clone()); SnTrace.Index.Write("SearchService: BackupInfo is added to history."); _backupManager = null; _backupCancellationSource.Dispose(); _backupCancellationSource = null; }
public override bool Open(ClusterConfig config, bool nonblocking) { this.m_cluster_config = config; m_cancelSrc = new CancellationTokenSource(); m_nameservice = AssemblyUtility.GetAllClassInstances <INameService>().First(); Log.WriteLine(LogLevel.Info, $"{nameof(DynamicMemoryCloud)}: using name service provided by '{m_nameservice.GetType().FullName}'"); m_chunktable = AssemblyUtility.GetAllClassInstances <IChunkTable>().First(); Log.WriteLine(LogLevel.Info, $"{nameof(DynamicMemoryCloud)}: using chunk table provided by '{m_chunktable.GetType().FullName}'"); m_taskqueue = AssemblyUtility.GetAllClassInstances <ITaskQueue>().First(); Log.WriteLine(LogLevel.Info, $"{nameof(DynamicMemoryCloud)}: using task queue provided by '{m_taskqueue.GetType().FullName}'"); m_healthmanager = AssemblyUtility.GetAllClassInstances <IHealthManager>().First(); Log.WriteLine(LogLevel.Info, $"{nameof(DynamicMemoryCloud)}: using health manager provided by '{m_healthmanager.GetType().FullName}'"); m_backupmgr = AssemblyUtility.GetAllClassInstances <IBackupManager>().First(); Log.WriteLine(LogLevel.Info, $"{nameof(DynamicMemoryCloud)}: using backup manager provided by '{m_backupmgr.GetType().FullName}'"); m_persistent_storage = AssemblyUtility.GetAllClassInstances <IPersistentStorage>().First(); Log.WriteLine(LogLevel.Info, $"{nameof(DynamicMemoryCloud)}: using persistent storage provided by '{m_persistent_storage.GetType().FullName}'"); m_nameservice.Start(m_cancelSrc.Token); m_taskqueue.Start(m_cancelSrc.Token); m_chunktable.Start(m_cancelSrc.Token); m_healthmanager.Start(m_cancelSrc.Token); m_backupmgr.Start(m_cancelSrc.Token); m_myid = GetInstanceId(InstanceGuid); m_storageTable = new DynamicStorageTable(PartitionCount); m_storageTable[m_myid] = Global.LocalStorage; NickName = GenerateNickName(InstanceGuid); int redundancy = DynamicClusterConfig.Instance.MinimumReplica; m_cloudidx = new CloudIndex(m_cancelSrc.Token, m_nameservice, m_chunktable, this, NickName, PartitionTable); m_healthmon = new HealthMonitor(m_cancelSrc.Token, m_nameservice, m_cloudidx, m_healthmanager, redundancy); m_partitioner = new Partitioner(m_cancelSrc.Token, m_cloudidx, m_nameservice, m_taskqueue, DynamicClusterConfig.Instance.ReplicationMode, redundancy); m_taskexec = new Executor(m_cancelSrc.Token, m_nameservice, m_taskqueue); m_backupctl = new BackupController(m_cancelSrc.Token, m_backupmgr, m_nameservice, m_persistent_storage, m_taskqueue); Log.WriteLine($"{nameof(DynamicMemoryCloud)}: Partition {MyPartitionId}: Instance '{NickName}' {InstanceGuid} opened."); Global.CommunicationInstance.Started += InitModule; return(true); }
public PathObserver(string indexPath, int delay, RepositoryType reposType, IIndexFactory indexFactory, IBackupManagerFactory backupFactory, ILogger logger, IFileHelper fileHelper, IPathSubjectFactory pathSubjectFactory) { this.delay = delay; var index = indexFactory.GetIndex(indexPath); this.manager = backupFactory.GetBackupManager(index, reposType); this.logger = logger; //Create path subjects foreach (var i in index.Values()) { var parts = i.Value; if (!Directory.Exists(parts[0]) || !Directory.Exists(parts[1])) { logger.Log(System.Diagnostics.EventLogEntryType.Warning, null, new ArgumentException("Could not create binding to path: " + parts[1])); continue; } var sub = pathSubjectFactory.GetPathSubject(i.Key, parts[0]); Attach(sub); } }
public TruncateTailManager( ReplicatedLogManager replicatedLogManager, TransactionMap transactionsMap, IStateManager stateManager, IBackupManager backupManager, LogicalSequenceNumber tailLsn, ApplyContext falseProgressApplyContext, PhysicalLogReader recoveryLogsReader, ITracer tracer) { Utility.Assert(tracer != null, "{0} TruncateTailManager: Input tracer cannot be null"); Utility.Assert(backupManager != null, "{0} TruncateTailManager: Input backupManager cannot be null", tracer.Type); this.replicatedLogManager = replicatedLogManager; this.recoveryLogsReader = recoveryLogsReader; this.transactionsMap = transactionsMap; this.stateManager = stateManager; this.backupManager = backupManager; this.tracer = tracer; this.tailLsn = tailLsn; this.falseProgressApplyContext = falseProgressApplyContext; }
/// <summary> /// Creates a new instance /// </summary> /// <param name="backupManager">An backup manager object that handles the restoring and creating of backups.</param> public AutoBackupManager(IBackupManager backupManager, GlobalBusyIndicatorState globalBusyIndicatorState) { this.backupManager = backupManager; this.globalBusyIndicatorState = globalBusyIndicatorState; }
internal void EnableGoogleDriveBackups() { BackupManager = new BackupViaGoogleDrive(this.mainWindow); }
internal void EnableLocalBackups() { BackupManager = new BackupViaFileCopying(this.mainWindow); }
public BackupTests() { _time = new MockTimeManager(DateTime.MinValue); _fs = new MockFileManager(_time); _backup = new BackupManager(_fs, _fs, null, null, null); }
internal RestoreCodeTreeCommand(IBackupManager backupManager) { this.backupManager = backupManager; }
/// <summary> /// Creates a new instance /// </summary> /// <param name="backupManager">An backup manager object that handles the restoring and creating of backups.</param> public AutoBackupManager(IBackupManager backupManager, GlobalBusyIndicatorState globalBusyIndicatorState) { this.backupManager = backupManager; this.globalBusyIndicatorState = globalBusyIndicatorState; }
internal BackUpCodeTreeCommand(IBackupManager backupManager) { this.backupManager = backupManager; }