Search in sources :

Example 1 with ClientReplacementRequest

use of org.apache.geode.cache.client.internal.locator.ClientReplacementRequest in project geode by apache.

the class AutoConnectionSourceImpl method findReplacementServer.

public ServerLocation findReplacementServer(ServerLocation currentServer, Set excludedServers) {
    if (PoolImpl.TEST_DURABLE_IS_NET_DOWN) {
        return null;
    }
    ClientReplacementRequest request = new ClientReplacementRequest(currentServer, excludedServers, serverGroup);
    ClientConnectionResponse response = (ClientConnectionResponse) queryLocators(request);
    if (response == null) {
        // getLogger().warning("Unable to connect to any locators in the list " + locators);
        throw new NoAvailableLocatorsException("Unable to connect to any locators in the list " + locators);
    }
    return response.getServer();
}
Also used : ClientConnectionResponse(org.apache.geode.cache.client.internal.locator.ClientConnectionResponse) ClientReplacementRequest(org.apache.geode.cache.client.internal.locator.ClientReplacementRequest) NoAvailableLocatorsException(org.apache.geode.cache.client.NoAvailableLocatorsException)

Aggregations

NoAvailableLocatorsException (org.apache.geode.cache.client.NoAvailableLocatorsException)1 ClientConnectionResponse (org.apache.geode.cache.client.internal.locator.ClientConnectionResponse)1 ClientReplacementRequest (org.apache.geode.cache.client.internal.locator.ClientReplacementRequest)1