java.lang.Object
org.elasticsearch.transport.RemoteClusterConnection
- All Implemented Interfaces:
Closeable
,AutoCloseable
Represents a connection to a single remote cluster. In contrast to a local cluster a remote cluster is not joined such that the
current node is part of the cluster and it won't receive cluster state updates from the remote cluster. Remote clusters are also not
fully connected with the current node. From a connection perspective a local cluster forms a bi-directional star network while in the
remote case we only connect to a subset of the nodes in the cluster in an uni-directional fashion.
This class also handles the discovery of nodes from the remote cluster. The initial list of seed nodes is only used to discover all nodes
in the remote cluster and connects to all eligible nodes, for details see
RemoteClusterService.REMOTE_NODE_ATTRIBUTE
.
In the case of a disconnection, this class will issue a re-connect task to establish at most
SniffConnectionStrategy.REMOTE_CONNECTIONS_PER_CLUSTER
until either all eligible nodes are exhausted or the maximum number of
connections per cluster has been reached.-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
isClosed
public boolean isClosed() -
getConnectionInfo
Get the information about remote nodes to be rendered on_remote/info
requests.