Skip to content

Commit

Permalink
Update java docstrings
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed Apr 3, 2023
1 parent 4d87934 commit 98b1af0
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ public void connectToNode(final DiscoveryNode node, ConnectionProfile connection
}

/**
* Connect to the specified node with the given connection profile.
* Connect to the specified node as an extension with the given connection profile.
* The ActionListener will be called on the calling thread or the generic thread pool.
*
* @param node the node to connect to
Expand All @@ -488,7 +488,12 @@ public void connectToNodeAsExtension(
listener.onResponse(null);
return;
}
connectionManager.connectToNode(node, connectionProfile, connectionValidatorForExtension(node, extensionUniqueId), listener);
connectionManager.connectToNode(
node,
connectionProfile,
connectionValidatorForExtensionConnectingToNode(node, extensionUniqueId),
listener
);
}

public void connectToExtensionNode(final DiscoveryNode node, ConnectionProfile connectionProfile, ActionListener<Void> listener) {
Expand All @@ -514,7 +519,10 @@ public ConnectionManager.ConnectionValidator connectionValidator(DiscoveryNode n
};
}

public ConnectionManager.ConnectionValidator connectionValidatorForExtension(DiscoveryNode node, String extensionUniqueId) {
public ConnectionManager.ConnectionValidator connectionValidatorForExtensionConnectingToNode(
DiscoveryNode node,
String extensionUniqueId
) {
return (newConnection, actualProfile, listener) -> {
// We don't validate cluster names to allow for CCS connections.
threadPool.getThreadContext().putHeader("extension_unique_id", extensionUniqueId);
Expand Down

0 comments on commit 98b1af0

Please sign in to comment.