try { allFutures.add(pingService.submit(potentialLeader, () -> Maps.immutableEntry(potentialLeader.getUUID(), potentialLeader))); } catch (RejectedExecutionException e) { if (logRateLimiter.tryAcquire()) {
private void setUpForLocalServices() throws IOException { doAnswer(invocation -> { // Configure our server to reply with the same server ID as the registered PingableLeader. PingableLeader localPingableLeader = invocation.getArgument(0); availableServer.stubFor(LEADER_UUID_MAPPING.willReturn(aResponse() .withStatus(200) .withBody(("\"" + localPingableLeader.getUUID() + "\"").getBytes()))); return null; }).when(environment).accept(isA(PingableLeader.class)); setUpLeaderBlockInConfig(); }
String localServerId = localPingableLeader.getUUID(); PingableLeader remotePingableLeader = AtlasDbFeignTargetFactory.createRsProxy( ServiceCreator.createTrustContext(leaderConfig.sslConfiguration()), while (true) { try { String remoteServerId = remotePingableLeader.getUUID(); useLocalServicesFuture.complete(localServerId.equals(remoteServerId)); return;
try { allFutures.add(pingService.submit(potentialLeader, () -> Maps.immutableEntry(potentialLeader.getUUID(), potentialLeader))); } catch (RejectedExecutionException e) { if (logRateLimiter.tryAcquire()) {
String localServerId = localPingableLeader.getUUID(); PingableLeader remotePingableLeader = AtlasDbFeignTargetFactory.createRsProxy( ServiceCreator.createTrustContext(leaderConfig.sslConfiguration()), while (true) { try { String remoteServerId = remotePingableLeader.getUUID(); useLocalServicesFuture.complete(localServerId.equals(remoteServerId)); return;