Search in sources :

Example 1 with TableMetadataCache

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());
}
Also used : AtlasJacksonModule(com.palantir.atlasdb.jackson.AtlasJacksonModule) AtlasDbServiceImpl(com.palantir.atlasdb.impl.AtlasDbServiceImpl) SerializableTransactionManager(com.palantir.atlasdb.transaction.impl.SerializableTransactionManager) TableMetadataCache(com.palantir.atlasdb.impl.TableMetadataCache)

Aggregations

AtlasDbServiceImpl (com.palantir.atlasdb.impl.AtlasDbServiceImpl)1 TableMetadataCache (com.palantir.atlasdb.impl.TableMetadataCache)1 AtlasJacksonModule (com.palantir.atlasdb.jackson.AtlasJacksonModule)1 SerializableTransactionManager (com.palantir.atlasdb.transaction.impl.SerializableTransactionManager)1