Class RemoteClusterConnection

java.lang.Object
org.elasticsearch.transport.RemoteClusterConnection
All Implemented Interfaces:
Closeable, AutoCloseable

public final class RemoteClusterConnection extends Object implements Closeable
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

    • isSkipUnavailable

      public boolean isSkipUnavailable()
      Returns whether this cluster is configured to be skipped when unavailable
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • isClosed

      public boolean isClosed()
    • getConnectionInfo

      public RemoteConnectionInfo getConnectionInfo()
      Get the information about remote nodes to be rendered on _remote/info requests.