コード例 #1
0
        public virtual Optional <JobHandle> ScheduleDownload(CatchupAddressProvider addressProvider)
        {
            lock (this)
            {
                if (_stopped)
                {
                    return(null);
                }

                if (_currentJob == null || _currentJob.hasCompleted())
                {
                    _currentJob = new PersistentSnapshotDownloader(addressProvider, _applicationProcess, _downloader, _log, _downloaderPauseStrategy, _dbHealth, _monitors);
                    _jobHandle  = _jobScheduler.schedule(Group.DOWNLOAD_SNAPSHOT, _currentJob);
                    return(_jobHandle);
                }
                return(_jobHandle);
            }
        }
コード例 #2
0
 private void InitializeInstanceFields()
 {
     _catchupAddressProvider = CatchupAddressProvider.fromSingleAddress(_remoteAddress);
     _downloader             = new CoreStateDownloader(_localDatabase, _startStopLife, _remoteStore, _catchUpClient, _logProvider, _storeCopyProcess, _coreStateMachines, _snapshotService, _commitStateHelper);
 }