@Override public void onFailure(Throwable t) { if (t instanceof UnsupportedProtocolVersionException) { cluster.manager.logUnsupportedVersionProtocol( host, ((UnsupportedProtocolVersionException) t).getUnsupportedVersion()); cluster.manager.triggerOnDown(host, false); } else if (t instanceof ClusterNameMismatchException) { ClusterNameMismatchException e = (ClusterNameMismatchException) t; cluster.manager.logClusterNameMismatch( host, e.expectedClusterName, e.actualClusterName); cluster.manager.triggerOnDown(host, false); } else { logger.warn("Error creating pool to " + host, t); // do not mark the host down, as there could be other connections to it // (e.g. the control connection, or another session pool). // The conviction policy will mark it down if it has no more active connections. } // propagate errors; for all other exceptions, consider the pool init failed // but allow the session init process to continue normally if (t instanceof Error) future.setException(t); else future.set(false); } });
logUnsupportedVersionProtocol(host, connectionFactory.protocolVersion); return; logUnsupportedVersionProtocol(host, e.getUnsupportedVersion()); return; } catch (ClusterNameMismatchException e) {
logUnsupportedVersionProtocol(host, connectionFactory.protocolVersion); return; logUnsupportedVersionProtocol(host, e.getUnsupportedVersion()); return; } catch (ClusterNameMismatchException e) {
logUnsupportedVersionProtocol(host, connectionFactory.protocolVersion); continue;
logUnsupportedVersionProtocol(host, connectionFactory.protocolVersion); continue;
logUnsupportedVersionProtocol(host, connectionFactory.protocolVersion); continue;
logUnsupportedVersionProtocol(host, connectionFactory.protocolVersion); return; logUnsupportedVersionProtocol(host, e.getUnsupportedVersion()); return; } catch (ClusterNameMismatchException e) {
logUnsupportedVersionProtocol(host, connectionFactory.protocolVersion); return; logUnsupportedVersionProtocol(host, e.getUnsupportedVersion()); return; } catch (ClusterNameMismatchException e) {
logUnsupportedVersionProtocol(host, connectionFactory.protocolVersion); return; logUnsupportedVersionProtocol(host, e.getUnsupportedVersion()); return; } catch (ClusterNameMismatchException e) {
logUnsupportedVersionProtocol(host, connectionFactory.protocolVersion); return; logUnsupportedVersionProtocol(host, e.getUnsupportedVersion()); return; } catch (ClusterNameMismatchException e) {
logUnsupportedVersionProtocol(host, connectionFactory.protocolVersion); return; logUnsupportedVersionProtocol(host, e.getUnsupportedVersion()); return; } catch (ClusterNameMismatchException e) {
logUnsupportedVersionProtocol(host, connectionFactory.protocolVersion); return; logUnsupportedVersionProtocol(host, e.getUnsupportedVersion()); return; } catch (ClusterNameMismatchException e) {
logUnsupportedVersionProtocol(host); return; logUnsupportedVersionProtocol(host); return;
logUnsupportedVersionProtocol(host); return; logUnsupportedVersionProtocol(host); return;
@Override public void onFailure(Throwable t) { if (t instanceof UnsupportedProtocolVersionException) { cluster.manager.logUnsupportedVersionProtocol(host, ((UnsupportedProtocolVersionException) t).getUnsupportedVersion()); cluster.manager.triggerOnDown(host, false); } else if (t instanceof ClusterNameMismatchException) { ClusterNameMismatchException e = (ClusterNameMismatchException) t; cluster.manager.logClusterNameMismatch(host, e.expectedClusterName, e.actualClusterName); cluster.manager.triggerOnDown(host, false); } else { logger.warn("Error creating pool to " + host, t); } future.set(false); } });
@Override public void onFailure(Throwable t) { if (t instanceof UnsupportedProtocolVersionException) { cluster.manager.logUnsupportedVersionProtocol(host, ((UnsupportedProtocolVersionException) t).getUnsupportedVersion()); cluster.manager.triggerOnDown(host, false); } else if (t instanceof ClusterNameMismatchException) { ClusterNameMismatchException e = (ClusterNameMismatchException) t; cluster.manager.logClusterNameMismatch(host, e.expectedClusterName, e.actualClusterName); cluster.manager.triggerOnDown(host, false); } else { logger.warn("Error creating pool to " + host, t); } future.set(false); } });
@Override public void onFailure(Throwable t) { if (t instanceof UnsupportedProtocolVersionException) { cluster.manager.logUnsupportedVersionProtocol(host, ((UnsupportedProtocolVersionException) t).getUnsupportedVersion()); cluster.manager.triggerOnDown(host, false); } else if (t instanceof ClusterNameMismatchException) { ClusterNameMismatchException e = (ClusterNameMismatchException) t; cluster.manager.logClusterNameMismatch(host, e.expectedClusterName, e.actualClusterName); cluster.manager.triggerOnDown(host, false); } else { logger.warn("Error creating pool to " + host, t); } future.set(false); } });
logUnsupportedVersionProtocol(host, connectionFactory.protocolVersion); continue;