diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/MonitoringClient.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/MonitoringClient.java index a3505ed9b2..21c8e179b7 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/MonitoringClient.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/MonitoringClient.java @@ -11,14 +11,10 @@ import com.algolia.utils.*; import com.fasterxml.jackson.core.type.TypeReference; import java.util.ArrayList; -import java.util.Collections; import java.util.EnumSet; import java.util.List; import java.util.Map; -import java.util.Random; import java.util.concurrent.CompletableFuture; -import java.util.stream.Collectors; -import java.util.stream.Stream; import javax.annotation.Nonnull; public class MonitoringClient extends ApiClient { @@ -28,22 +24,13 @@ public MonitoringClient(String appId, String apiKey) { } public MonitoringClient(String appId, String apiKey, ClientOptions options) { - super(appId, apiKey, "Monitoring", options, getDefaultHosts(appId)); + super(appId, apiKey, "Monitoring", options, getDefaultHosts()); } - private static List getDefaultHosts(String appId) { + private static List getDefaultHosts() { List hosts = new ArrayList<>(); - hosts.add(new Host(appId + "-dsn.algolia.net", EnumSet.of(CallType.READ))); - hosts.add(new Host(appId + ".algolia.net", EnumSet.of(CallType.WRITE))); - - List commonHosts = new ArrayList<>(); - hosts.add(new Host(appId + "-1.algolianet.net", EnumSet.of(CallType.READ, CallType.WRITE))); - hosts.add(new Host(appId + "-2.algolianet.net", EnumSet.of(CallType.READ, CallType.WRITE))); - hosts.add(new Host(appId + "-3.algolianet.net", EnumSet.of(CallType.READ, CallType.WRITE))); - - Collections.shuffle(commonHosts, new Random()); - - return Stream.concat(hosts.stream(), commonHosts.stream()).collect(Collectors.toList()); + hosts.add(new Host("status.algolia.com", EnumSet.of(CallType.READ, CallType.WRITE))); + return hosts; } /**