use of com.palantir.atlasdb.impl.TableMetadataCache in project atlasdb by palantir.
the class AtlasDbServiceServer method run.
@Override
public void run(AtlasDbServiceServerConfiguration config, final Environment environment) throws Exception {
AtlasDbMetrics.setMetricRegistries(environment.metrics(), DefaultTaggedMetricRegistry.getDefault());
SerializableTransactionManager tm = TransactionManagers.builder().config(config.getConfig()).userAgent("AtlasDbServiceServer").globalMetricsRegistry(environment.metrics()).globalTaggedMetricRegistry(DefaultTaggedMetricRegistry.getDefault()).registrar(environment.jersey()::register).build().serializable();
TableMetadataCache cache = new TableMetadataCache(tm.getKeyValueService());
environment.jersey().register(new AtlasDbServiceImpl(tm.getKeyValueService(), tm, cache));
environment.getObjectMapper().registerModule(new AtlasJacksonModule(cache).createModule());
}
Aggregations