use of com.palantir.atlasdb.timelock.management.ServiceLifecycleController in project atlasdb by palantir.
the class TimeLockAgent method registerManagementResource.
private void registerManagementResource() {
ServiceLifecycleController serviceLifecycleController = new ServiceLifecycleController(serviceStopper, PTExecutors.newSingleThreadScheduledExecutor());
AllNodesDisabledNamespacesUpdater allNodesDisabledNamespacesUpdater = updaterFactory.create(namespaces);
if (undertowRegistrar.isPresent()) {
registerCorruptionHandlerWrappedService(undertowRegistrar.get(), TimeLockManagementResource.undertow(timestampStorage.persistentNamespaceContext(), namespaces, allNodesDisabledNamespacesUpdater, getAuthHeaderValidator(), redirectRetryTargeter(), serviceLifecycleController));
} else {
registrar.accept(TimeLockManagementResource.jersey(timestampStorage.persistentNamespaceContext(), namespaces, allNodesDisabledNamespacesUpdater, getAuthHeaderValidator(), redirectRetryTargeter(), serviceLifecycleController));
}
}
Aggregations