/** * Returns <code>true</code> iff the given node is already connected. */ public boolean nodeConnected(DiscoveryNode node) { return isLocalNode(node) || connectionManager.nodeConnected(node); }
/** * Returns a connection to the remote cluster, preferably a direct connection to the provided {@link DiscoveryNode}. * If such node is not connected, the returned connection will be a proxy connection that redirects to it. */ Transport.Connection getConnection(DiscoveryNode remoteClusterNode) { if (connectionManager.nodeConnected(remoteClusterNode)) { return connectionManager.getConnection(remoteClusterNode); } DiscoveryNode discoveryNode = getAnyConnectedNode(); Transport.Connection connection = connectionManager.getConnection(discoveryNode); return new ProxyConnection(connection, remoteClusterNode); }
/** * Returns <code>true</code> iff the given node is already connected. */ public boolean nodeConnected(DiscoveryNode node) { return isLocalNode(node) || transport.nodeConnected(node); }
/** * Returns <code>true</code> iff the given node is already connected. */ public boolean nodeConnected(DiscoveryNode node) { return isLocalNode(node) || connectionManager.nodeConnected(node); }
/** * Returns a connection to the remote cluster, preferably a direct connection to the provided {@link DiscoveryNode}. * If such node is not connected, the returned connection will be a proxy connection that redirects to it. */ Transport.Connection getConnection(DiscoveryNode remoteClusterNode) { if (connectionManager.nodeConnected(remoteClusterNode)) { return connectionManager.getConnection(remoteClusterNode); } DiscoveryNode discoveryNode = getAnyConnectedNode(); Transport.Connection connection = connectionManager.getConnection(discoveryNode); return new ProxyConnection(connection, remoteClusterNode); }
if (transportService.nodeConnected(remoteClusterNode)) { return transportService.getConnection(remoteClusterNode);