You are here

public function ClusterManager::setDefaultCluster in Elasticsearch Connector 8.6

Same name and namespace in other branches
  1. 8.7 src/ClusterManager.php \Drupal\elasticsearch_connector\ClusterManager::setDefaultCluster()
  2. 8.5 src/ClusterManager.php \Drupal\elasticsearch_connector\ClusterManager::setDefaultCluster()

Set the default (cluster) used by Elasticsearch.

Parameters

string $cluster_id: The new cluster identifier.

File

src/ClusterManager.php, line 55

Class

ClusterManager
ClusterManager service.

Namespace

Drupal\elasticsearch_connector

Code

public function setDefaultCluster($cluster_id) {
  $this->state
    ->set('elasticsearch_connector_get_default_connector', $cluster_id);
}