/** * called from gossiper when it notices a node is not responding. */ public void convict(InetAddress ep) { logger.trace("Resetting pool for {}", ep); getConnectionPool(ep).reset(); }
/** * called from gossiper when it notices a node is not responding. */ public void convict(InetAddress ep) { logger.trace("Resetting pool for {}", ep); getConnectionPool(ep).reset(); }
/** * called from gossiper when it notices a node is not responding. */ public void convict(InetAddress ep) { logger.trace("Resetting pool for {}", ep); getConnectionPool(ep).reset(); }
public OutboundTcpConnection getConnection(InetAddress to, MessageOut msg) { return getConnectionPool(to).getConnection(msg); }
/** * called from gossiper when it notices a node is not responding. */ public void convict(InetAddress ep) { logger.debug("Resetting pool for {}", ep); getConnectionPool(ep).reset(); }
public OutboundTcpConnection getConnection(InetAddress to, MessageOut msg) { return getConnectionPool(to).getConnection(msg); }
public OutboundTcpConnection getConnection(InetAddress to, MessageOut msg) { return getConnectionPool(to).getConnection(msg); }
public OutboundTcpConnection getConnection(InetAddress to, MessageOut msg) { return getConnectionPool(to).getConnection(msg); }
private void reconnect(InetAddress publicAddress, InetAddress localAddress) { if (snitch.getDatacenter(publicAddress).equals(localDc) && !MessagingService.instance().getConnectionPool(publicAddress).endPoint().equals(localAddress)) { MessagingService.instance().getConnectionPool(publicAddress).reset(localAddress); logger.debug(String.format("Intiated reconnect to an Internal IP %s for the %s", localAddress, publicAddress)); } }
private void reconnect(InetAddress publicAddress, InetAddress localAddress) { if (snitch.getDatacenter(publicAddress).equals(localDc) && !MessagingService.instance().getConnectionPool(publicAddress).endPoint().equals(localAddress)) { MessagingService.instance().getConnectionPool(publicAddress).reset(localAddress); logger.debug("Initiated reconnect to an Internal IP {} for the {}", localAddress, publicAddress); } }
private void reconnect(InetAddress publicAddress, InetAddress localAddress) { if (snitch.getDatacenter(publicAddress).equals(localDc) && !MessagingService.instance().getConnectionPool(publicAddress).endPoint().equals(localAddress)) { MessagingService.instance().getConnectionPool(publicAddress).reset(localAddress); logger.debug("Initiated reconnect to an Internal IP {} for the {}", localAddress, publicAddress); } }
private void reconnect(InetAddress publicAddress, InetAddress localAddress) { if (snitch.getDatacenter(publicAddress).equals(localDc) && !MessagingService.instance().getConnectionPool(publicAddress).endPoint().equals(localAddress)) { MessagingService.instance().getConnectionPool(publicAddress).reset(localAddress); logger.debug("Initiated reconnect to an Internal IP {} for the {}", localAddress, publicAddress); } }
/** * Applies back-pressure for the given hosts, according to the configured strategy. * * If the local host is present, it is removed from the pool, as back-pressure is only applied * to remote hosts. * * @param hosts The hosts to apply back-pressure to. * @param timeoutInNanos The max back-pressure timeout. */ public void applyBackPressure(Iterable<InetAddress> hosts, long timeoutInNanos) { if (DatabaseDescriptor.backPressureEnabled()) { backPressure.apply(StreamSupport.stream(hosts.spliterator(), false) .filter(h -> !h.equals(FBUtilities.getBroadcastAddress())) .map(h -> getConnectionPool(h).getBackPressureState()) .collect(Collectors.toSet()), timeoutInNanos, TimeUnit.NANOSECONDS); } }
/** * Applies back-pressure for the given hosts, according to the configured strategy. * * If the local host is present, it is removed from the pool, as back-pressure is only applied * to remote hosts. * * @param hosts The hosts to apply back-pressure to. * @param timeoutInNanos The max back-pressure timeout. */ public void applyBackPressure(Iterable<InetAddress> hosts, long timeoutInNanos) { if (DatabaseDescriptor.backPressureEnabled()) { backPressure.apply(StreamSupport.stream(hosts.spliterator(), false) .filter(h -> !h.equals(FBUtilities.getBroadcastAddress())) .map(h -> getConnectionPool(h).getBackPressureState()) .collect(Collectors.toSet()), timeoutInNanos, TimeUnit.NANOSECONDS); } }
/** * Updates the back-pressure state on sending to the given host if enabled and the given message callback supports it. * * @param host The replica host the back-pressure state refers to. * @param callback The message callback. * @param message The actual message. */ public void updateBackPressureOnSend(InetAddress host, IAsyncCallback callback, MessageOut<?> message) { if (DatabaseDescriptor.backPressureEnabled() && callback.supportsBackPressure()) { BackPressureState backPressureState = getConnectionPool(host).getBackPressureState(); backPressureState.onMessageSent(message); } }
/** * Updates the back-pressure state on sending to the given host if enabled and the given message callback supports it. * * @param host The replica host the back-pressure state refers to. * @param callback The message callback. * @param message The actual message. */ public void updateBackPressureOnSend(InetAddress host, IAsyncCallback callback, MessageOut<?> message) { if (DatabaseDescriptor.backPressureEnabled() && callback.supportsBackPressure()) { BackPressureState backPressureState = getConnectionPool(host).getBackPressureState(); backPressureState.onMessageSent(message); } }
/** * Updates the back-pressure state on sending to the given host if enabled and the given message callback supports it. * * @param host The replica host the back-pressure state refers to. * @param callback The message callback. * @param message The actual message. */ public void updateBackPressureOnSend(InetAddress host, IAsyncCallback callback, MessageOut<?> message) { if (DatabaseDescriptor.backPressureEnabled() && callback.supportsBackPressure()) { BackPressureState backPressureState = getConnectionPool(host).getBackPressureState(); backPressureState.onMessageSent(message); } }
/** * Updates the back-pressure state on reception from the given host if enabled and the given message callback supports it. * * @param host The replica host the back-pressure state refers to. * @param callback The message callback. * @param timeout True if updated following a timeout, false otherwise. */ public void updateBackPressureOnReceive(InetAddress host, IAsyncCallback callback, boolean timeout) { if (DatabaseDescriptor.backPressureEnabled() && callback.supportsBackPressure()) { BackPressureState backPressureState = getConnectionPool(host).getBackPressureState(); if (!timeout) backPressureState.onResponseReceived(); else backPressureState.onResponseTimeout(); } }
/** * Updates the back-pressure state on reception from the given host if enabled and the given message callback supports it. * * @param host The replica host the back-pressure state refers to. * @param callback The message callback. * @param timeout True if updated following a timeout, false otherwise. */ public void updateBackPressureOnReceive(InetAddress host, IAsyncCallback callback, boolean timeout) { if (DatabaseDescriptor.backPressureEnabled() && callback.supportsBackPressure()) { BackPressureState backPressureState = getConnectionPool(host).getBackPressureState(); if (!timeout) backPressureState.onResponseReceived(); else backPressureState.onResponseTimeout(); } }
/** * Updates the back-pressure state on reception from the given host if enabled and the given message callback supports it. * * @param host The replica host the back-pressure state refers to. * @param callback The message callback. * @param timeout True if updated following a timeout, false otherwise. */ public void updateBackPressureOnReceive(InetAddress host, IAsyncCallback callback, boolean timeout) { if (DatabaseDescriptor.backPressureEnabled() && callback.supportsBackPressure()) { BackPressureState backPressureState = getConnectionPool(host).getBackPressureState(); if (!timeout) backPressureState.onResponseReceived(); else backPressureState.onResponseTimeout(); } }