@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); } });
cluster.manager.triggerOnDown(pool.host, true);
@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); } });
triggerOnDown(hostDown); break;
cluster.manager.triggerOnDown(pool.host, true);
public ListenableFuture<?> triggerOnDown(final Host host, boolean startReconnection) { return triggerOnDown(host, false, startReconnection); }
public ListenableFuture<?> triggerOnDown(final Host host, boolean startReconnection) { return triggerOnDown(host, false, startReconnection); }
public ListenableFuture<?> triggerOnDown(final Host host, boolean startReconnection) { return triggerOnDown(host, false, startReconnection); }
@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); } });
public void signalHostDown(Host host, boolean isHostAddition) { // Don't mark the node down until we've fully initialized the controlConnection as this might mess up with // the protocol detection if (!isFullyInit || isClosed()) return; triggerOnDown(host, isHostAddition, true); }
public ListenableFuture<?> triggerOnDown(final Host host) { return triggerOnDown(host, 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); } });
public void signalHostDown(Host host, boolean isHostAddition) { // Don't mark the node down until we've fully initialized the controlConnection as this might mess up with // the protocol detection if (!isFullyInit || isClosed()) return; triggerOnDown(host, isHostAddition, true); }
public void signalHostDown(Host host, boolean isHostAddition) { // Don't mark the node down until we've fully initialized the controlConnection as this might mess up with // the protocol detection if (!isFullyInit || isClosed()) return; triggerOnDown(host, isHostAddition, true); }
public boolean signalConnectionFailure(Host host, ConnectionException exception, boolean isHostAddition) { if (isClosed()) return true; boolean isDown = host.signalConnectionFailure(exception); if (isDown) triggerOnDown(host, isHostAddition); return isDown; }
public ListenableFuture<?> triggerOnDown(final Host host, boolean startReconnection) { return triggerOnDown(host, false, startReconnection); }
public void signalHostDown(Host host, boolean isHostAddition) { // Don't mark the node down until we've fully initialized the controlConnection as this might // mess up with // the protocol detection if (!isFullyInit || isClosed()) return; triggerOnDown(host, isHostAddition, true); }