@Override public ConnectionStats getStats() { return getEndpoint().getStats(); }
@Override public ServerLocation getServer() { return getEndpoint().getLocation(); }
private ConnectionList(QueueConnectionImpl primary, List backups, GemFireException discoveryException, QueueConnectionImpl failedPrimary) { this.primary = primary; Map allConnectionsTmp = new HashMap(); for (Iterator itr = backups.iterator(); itr.hasNext();) { QueueConnectionImpl nextConnection = (QueueConnectionImpl) itr.next(); allConnectionsTmp.put(nextConnection.getEndpoint(), nextConnection); } if (primary != null) { allConnectionsTmp.put(primary.getEndpoint(), primary); } this.connectionMap = Collections.unmodifiableMap(allConnectionsTmp); this.backups = Collections.unmodifiableList(new ArrayList(backups)); pool.getStats().setSubscriptionCount(connectionMap.size()); this.primaryDiscoveryException = discoveryException; this.failedPrimary = failedPrimary; }
} catch (Exception e) { logger.warn("Error closing primary connection to " + primary.getEndpoint(), e); } catch (Exception e) { logger.warn("Error closing backup connection to " + backup.getEndpoint(), e);
if (connection.getEndpoint().isClosed() || shuttingDown || pool.getPoolOrCacheCancelInProgress() != null) { isBadConnection = true; logger.debug( "Endpoint {} crashed while creating a connection. The connection will be destroyed", connection.getEndpoint()); if (logger.isDebugEnabled()) { logger.debug("Error destroying client to server connection to {}", connection.getEndpoint(), e);
logger.debug( "SubscriptionManager redundancy satisfier - created a queue on server {}", queueConnection.getEndpoint());
} catch (Exception e) { logger.warn("Error destroying client to server connection to {}", deadConnection.getEndpoint(), e);
logger.debug( "SubscriptionManager redundancy satisfier - Switched backup server to primary: {}", newPrimary.getEndpoint()); logger.debug( "SubscriptionManager redundancy satisfier - Non backup server was made primary. Recovering interest {}", newPrimary.getEndpoint());