Search in sources :

Example 1 with WithDedicatedExecutor

use of com.palantir.atlasdb.timelock.paxos.WithDedicatedExecutor in project atlasdb by palantir.

the class AllNodesDisabledNamespacesUpdaterFactory method create.

public AllNodesDisabledNamespacesUpdater create(TimelockNamespaces localNamespaces) {
    PaxosRemoteClients remoteClients = ImmutablePaxosRemoteClients.of(install, metricsManager);
    List<WithDedicatedExecutor<DisabledNamespacesUpdaterService>> remoteUpdaters = remoteClients.updaters();
    Map<DisabledNamespacesUpdaterService, CheckedRejectionExecutorService> remoteExecutors = ImmutableMap.<DisabledNamespacesUpdaterService, CheckedRejectionExecutorService>builder().putAll(KeyedStream.of(remoteUpdaters).mapKeys(WithDedicatedExecutor::service).map(WithDedicatedExecutor::executor).collectToMap()).build();
    ImmutableList<DisabledNamespacesUpdaterService> remoteServices = ImmutableList.copyOf(remoteUpdaters.stream().map(WithDedicatedExecutor::service).collect(Collectors.toList()));
    return AllNodesDisabledNamespacesUpdater.create(remoteServices, remoteExecutors, localNamespaces);
}
Also used : WithDedicatedExecutor(com.palantir.atlasdb.timelock.paxos.WithDedicatedExecutor) DisabledNamespacesUpdaterService(com.palantir.atlasdb.timelock.api.DisabledNamespacesUpdaterService) CheckedRejectionExecutorService(com.palantir.common.concurrent.CheckedRejectionExecutorService) PaxosRemoteClients(com.palantir.atlasdb.timelock.paxos.PaxosRemoteClients) ImmutablePaxosRemoteClients(com.palantir.atlasdb.timelock.paxos.ImmutablePaxosRemoteClients)

Aggregations

DisabledNamespacesUpdaterService (com.palantir.atlasdb.timelock.api.DisabledNamespacesUpdaterService)1 ImmutablePaxosRemoteClients (com.palantir.atlasdb.timelock.paxos.ImmutablePaxosRemoteClients)1 PaxosRemoteClients (com.palantir.atlasdb.timelock.paxos.PaxosRemoteClients)1 WithDedicatedExecutor (com.palantir.atlasdb.timelock.paxos.WithDedicatedExecutor)1 CheckedRejectionExecutorService (com.palantir.common.concurrent.CheckedRejectionExecutorService)1