use of com.palantir.atlasdb.config.ImmutableAtlasDbRuntimeConfig in project atlasdb by palantir.
the class AtlasDbServicesConnector method connect.
public AtlasDbServices connect() {
if (services != null) {
throw new IllegalStateException("connect() has already been called");
}
DockerizedDatabaseUri dburi = DockerizedDatabaseUri.fromUriString(uri);
KeyValueServiceConfig config = dburi.getKeyValueServiceInstrumentation().getKeyValueServiceConfig(dburi.getAddress());
ImmutableAtlasDbConfig atlasDbConfig = ImmutableAtlasDbConfig.builder().keyValueService(config).build();
ImmutableAtlasDbRuntimeConfig runtimeConfig = ImmutableAtlasDbRuntimeConfig.defaultRuntimeConfig();
ServicesConfigModule servicesConfigModule = ServicesConfigModule.create(atlasDbConfig, runtimeConfig);
services = DaggerAtlasDbServices.builder().servicesConfigModule(servicesConfigModule).build();
return services;
}
Aggregations