use of com.palantir.atlasdb.timelock.config.TimeLockServerConfiguration in project atlasdb by palantir.
the class BlockingTimeoutsTest method returnsDefaultBlockingTimeoutWithNoSpecifiedConnectors.
@Test
public void returnsDefaultBlockingTimeoutWithNoSpecifiedConnectors() {
TimeLockServerConfiguration basicConfiguration = new TimeLockServerConfiguration(null, CLUSTER, CLIENTS, null, ImmutableTimeLimiterConfiguration.of(true, TEST_ERROR_MARGIN), null, null);
long expectedMargin = scaleForErrorMarginReferenceImplementation(BlockingTimeouts.DEFAULT_IDLE_TIMEOUT, TEST_ERROR_MARGIN);
assertThat(BlockingTimeouts.getBlockingTimeout(OBJECT_MAPPER, basicConfiguration)).isEqualTo(expectedMargin);
}
use of com.palantir.atlasdb.timelock.config.TimeLockServerConfiguration in project atlasdb by palantir.
the class TimeLockServerLauncher method run.
@Override
public void run(TimeLockServerConfiguration configuration, Environment environment) {
environment.getObjectMapper().registerModule(new Jdk8Module());
environment.jersey().register(HttpRemotingJerseyFeature.INSTANCE);
CombinedTimeLockServerConfiguration combined = TimeLockConfigMigrator.convert(configuration, environment);
Consumer<Object> registrar = component -> environment.jersey().register(component);
TimeLockAgent.create(combined.install(), // this won't actually live reload
combined::runtime, combined.deprecated(), registrar);
}
Aggregations