Search in sources :

Example 1 with ServiceLifecycleController

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));
    }
}
Also used : ServiceLifecycleController(com.palantir.atlasdb.timelock.management.ServiceLifecycleController) AllNodesDisabledNamespacesUpdater(com.palantir.atlasdb.timelock.management.AllNodesDisabledNamespacesUpdater)

Aggregations

AllNodesDisabledNamespacesUpdater (com.palantir.atlasdb.timelock.management.AllNodesDisabledNamespacesUpdater)1 ServiceLifecycleController (com.palantir.atlasdb.timelock.management.ServiceLifecycleController)1