Search in sources :

Example 1 with TimeLockClientConfig

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);
}
Also used : ImmutableTimeLockClientConfig(com.palantir.atlasdb.config.ImmutableTimeLockClientConfig) TimeLockClientConfig(com.palantir.atlasdb.config.TimeLockClientConfig)

Aggregations

ImmutableTimeLockClientConfig (com.palantir.atlasdb.config.ImmutableTimeLockClientConfig)1 TimeLockClientConfig (com.palantir.atlasdb.config.TimeLockClientConfig)1