Search in sources :

Example 1 with TimeLockMigrator

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);
}
Also used : ImmutableServerListConfig(com.palantir.atlasdb.config.ImmutableServerListConfig) ServerListConfig(com.palantir.atlasdb.config.ServerListConfig) TimeLockMigrator(com.palantir.atlasdb.factory.startup.TimeLockMigrator)

Aggregations

ImmutableServerListConfig (com.palantir.atlasdb.config.ImmutableServerListConfig)1 ServerListConfig (com.palantir.atlasdb.config.ServerListConfig)1 TimeLockMigrator (com.palantir.atlasdb.factory.startup.TimeLockMigrator)1