Search in sources :

Example 6 with ExecutablePool

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

the class ClientTypeRegistration method getEnumById.

public EnumInfo getEnumById(int enumId) {
    Collection<Pool> pools = getAllPools();
    ServerConnectivityException lastException = null;
    for (Pool pool : pools) {
        try {
            EnumInfo result = GetPDXEnumByIdOp.execute((ExecutablePool) pool, enumId);
            if (result != null) {
                return result;
            }
        } catch (ServerConnectivityException e) {
            logger.debug("Received an exception getting pdx type from pool {}, {}", pool, e.getMessage(), e);
            // ignore, try the next pool.
            lastException = e;
        }
    }
    throw returnCorrectExceptionForFailure(pools, enumId, lastException);
}
Also used : ServerConnectivityException(org.apache.geode.cache.client.ServerConnectivityException) ExecutablePool(org.apache.geode.cache.client.internal.ExecutablePool) Pool(org.apache.geode.cache.client.Pool)

Aggregations

Pool (org.apache.geode.cache.client.Pool)6 ExecutablePool (org.apache.geode.cache.client.internal.ExecutablePool)6 ServerConnectivityException (org.apache.geode.cache.client.ServerConnectivityException)5 HashMap (java.util.HashMap)2 CacheClosedException (org.apache.geode.cache.CacheClosedException)1