use of com.palantir.atlasdb.factory.startup.TimeLockMigrator in project atlasdb by palantir.
the class TransactionManagers method createRawServicesFromTimeLock.
private static LockAndTimestampServices createRawServicesFromTimeLock(AtlasDbConfig config, Supplier<AtlasDbRuntimeConfig> runtimeConfigSupplier, TimestampStoreInvalidator invalidator, String userAgent) {
Supplier<ServerListConfig> serverListConfigSupplier = getServerListConfigSupplierForTimeLock(config, runtimeConfigSupplier);
TimeLockMigrator migrator = TimeLockMigrator.create(serverListConfigSupplier, invalidator, userAgent, config.initializeAsync());
// This can proceed async if config.initializeAsync() was set
migrator.migrate();
return ImmutableLockAndTimestampServices.copyOf(getLockAndTimestampServices(serverListConfigSupplier, userAgent)).withMigrator(migrator);
}
Aggregations