use of com.palantir.atlasdb.factory.ServiceDiscoveringAtlasSupplier in project atlasdb by palantir.
the class DbBoundTimestampCreator method createTimestampService.
@Override
public Supplier<ManagedTimestampService> createTimestampService(String client, LeaderConfig leaderConfig) {
ServiceDiscoveringAtlasSupplier atlasFactory = new ServiceDiscoveringAtlasSupplier(kvsConfig, Optional.of(leaderConfig), Optional.empty(), Optional.of(AtlasDbConstants.TIMELOCK_TIMESTAMP_TABLE));
TimestampService timestampService = atlasFactory.getTimestampService();
Preconditions.checkArgument(TimestampManagementService.class.isInstance(timestampService), "The timestamp service is not a managed timestamp service.");
return () -> new DelegatingManagedTimestampService(timestampService, (TimestampManagementService) timestampService);
}
Aggregations