use of com.palantir.atlasdb.config.TimeLockClientConfig in project atlasdb by palantir.
the class TransactionManagers method getServerListConfigSupplierForTimeLock.
private static Supplier<ServerListConfig> getServerListConfigSupplierForTimeLock(AtlasDbConfig config, Supplier<AtlasDbRuntimeConfig> runtimeConfigSupplier) {
Preconditions.checkState(!remoteTimestampAndLockOrLeaderBlocksPresent(config), "Cannot create raw services from timelock with another source of timestamps/locks configured!");
TimeLockClientConfig clientConfig = config.timelock().orElse(ImmutableTimeLockClientConfig.builder().build());
String resolvedClient = OptionalResolver.resolve(clientConfig.client(), config.namespace());
return () -> ServerListConfigs.parseInstallAndRuntimeConfigs(clientConfig, () -> runtimeConfigSupplier.get().timelockRuntime(), resolvedClient);
}
Aggregations