You are here

public function SolrDiskUsageSensorPlugin::getSolrServer in Monitoring 8

Returns the Solr server.

Return value

\Drupal\search_api\ServerInterface|null Returns the Solr server or NULL.

2 calls to SolrDiskUsageSensorPlugin::getSolrServer()
SolrDiskUsageSensorPlugin::getSolrIndexSize in src/Plugin/monitoring/SensorPlugin/SolrDiskUsageSensorPlugin.php
Returns the Solr index size.
SolrDiskUsageSensorPlugin::getSolrInfo in src/Plugin/monitoring/SensorPlugin/SolrDiskUsageSensorPlugin.php
Returns Solr information.

File

src/Plugin/monitoring/SensorPlugin/SolrDiskUsageSensorPlugin.php, line 305

Class

SolrDiskUsageSensorPlugin
Monitors the Solr disk usage.

Namespace

Drupal\monitoring\Plugin\monitoring\SensorPlugin

Code

public function getSolrServer() {
  if (!$this->solrServer) {
    $this->solrServer = $this
      ->getSolrServerIfAvailable();
  }
  return $this->solrServer;
}