public CoreStateDownloader(LocalDatabase localDatabase, Suspendable suspendOnStoreCopy, RemoteStore remoteStore, CatchUpClient catchUpClient, LogProvider logProvider, StoreCopyProcess storeCopyProcess, CoreStateMachines coreStateMachines, CoreSnapshotService snapshotService, CommitStateHelper commitStateHelper) { this._localDatabase = localDatabase; this._suspendOnStoreCopy = suspendOnStoreCopy; this._remoteStore = remoteStore; this._catchUpClient = catchUpClient; this._log = logProvider.getLog(this.GetType()); this._storeCopyProcess = storeCopyProcess; this._coreStateMachines = coreStateMachines; this._snapshotService = snapshotService; this._commitStateHelper = commitStateHelper; }
private CoreStateDownloader CreateCoreStateDownloader(Suspendable servicesToSuspendOnStoreCopy, CatchUpClient catchUpClient) { ExponentialBackoffStrategy storeCopyBackoffStrategy = new ExponentialBackoffStrategy(1, _config.get(CausalClusteringSettings.store_copy_backoff_max_wait).toMillis(), TimeUnit.MILLISECONDS); RemoteStore remoteStore = new RemoteStore(_logProvider, _platformModule.fileSystem, _platformModule.pageCache, new StoreCopyClient(catchUpClient, _platformModule.monitors, _logProvider, storeCopyBackoffStrategy), new TxPullClient(catchUpClient, _platformModule.monitors), new TransactionLogCatchUpFactory(), _config, _platformModule.monitors); CopiedStoreRecovery copiedStoreRecovery = _platformModule.life.add(new CopiedStoreRecovery(_platformModule.config, _platformModule.kernelExtensionFactories, _platformModule.pageCache)); StoreCopyProcess storeCopyProcess = new StoreCopyProcess(_platformModule.fileSystem, _platformModule.pageCache, _localDatabase, copiedStoreRecovery, remoteStore, _logProvider); CommitStateHelper commitStateHelper = new CommitStateHelper(_platformModule.pageCache, _platformModule.fileSystem, _config); return(new CoreStateDownloader(_localDatabase, servicesToSuspendOnStoreCopy, remoteStore, catchUpClient, _logProvider, storeCopyProcess, _coreStateMachinesModule.coreStateMachines, _snapshotService, commitStateHelper)); }