Beispiel #1
0
 public StoreUpgrader(UpgradableDatabase upgradableDatabase, MigrationProgressMonitor progressMonitor, Config config, FileSystemAbstraction fileSystem, PageCache pageCache, LogProvider logProvider)
 {
     this._upgradableDatabase = upgradableDatabase;
     this._progressMonitor    = progressMonitor;
     this._fileSystem         = fileSystem;
     this._config             = config;
     this._pageCache          = pageCache;
     this._logProvider        = logProvider;
     this._log = logProvider.getLog(this.GetType());
 }
Beispiel #2
0
        private StoreUpgrader NewUpgrader(UpgradableDatabase upgradableDatabase, PageCache pageCache, Config config, MigrationProgressMonitor progressMonitor)
        {
            NullLogService      instance        = NullLogService.Instance;
            StoreMigrator       defaultMigrator = new StoreMigrator(_fileSystem, pageCache, TuningConfig, instance, _jobScheduler);
            CountsMigrator      countsMigrator  = new CountsMigrator(_fileSystem, pageCache, TuningConfig);
            SchemaIndexMigrator indexMigrator   = new SchemaIndexMigrator(_fileSystem, IndexProvider.EMPTY);

            StoreUpgrader upgrader = new StoreUpgrader(upgradableDatabase, progressMonitor, config, _fileSystem, pageCache, NullLogProvider.Instance);

            upgrader.AddParticipant(indexMigrator);
            upgrader.AddParticipant(AbstractStoreMigrationParticipant.NOT_PARTICIPATING);
            upgrader.AddParticipant(AbstractStoreMigrationParticipant.NOT_PARTICIPATING);
            upgrader.AddParticipant(AbstractStoreMigrationParticipant.NOT_PARTICIPATING);
            upgrader.AddParticipant(AbstractStoreMigrationParticipant.NOT_PARTICIPATING);
            upgrader.AddParticipant(defaultMigrator);
            upgrader.AddParticipant(countsMigrator);
            return(upgrader);
        }
Beispiel #3
0
        private StoreUpgrader NewUpgrader(UpgradableDatabase upgradableDatabase, PageCache pageCache, MigrationProgressMonitor progressMonitor, SchemaIndexMigrator indexMigrator, StoreMigrator migrator)
        {
            Config allowUpgrade = Config.defaults(GraphDatabaseSettings.allow_upgrade, "true");

            StoreUpgrader upgrader = new StoreUpgrader(upgradableDatabase, progressMonitor, allowUpgrade, _fs, pageCache, NullLogProvider.Instance);

            upgrader.AddParticipant(indexMigrator);
            upgrader.AddParticipant(migrator);
            return(upgrader);
        }