use of com.palantir.atlasdb.timelock.paxos.PaxosRemoteClients 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);
}
Aggregations