ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilObjSearchRpcClientCoordinator.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
24{
27
28 public function __construct(
31 ) {
32 $this->settings = $settings;
33 $this->src_logger = $src_logger;
34 }
35
36 public function refreshLuceneSettings(): bool
37 {
38 try {
39 $this->getRpcClient()->refreshSettings(
40 $this->getClientId() .
41 '_' .
42 $this->settings->get('inst_id', '0')
43 );
44 return true;
45 } catch (Exception $exception) {
46 $this->src_logger->error(
47 'Refresh of lucene server settings failed with message: ' .
48 $exception->getMessage()
49 );
50 throw $exception;
51 }
52 }
53
54 protected function getRpcClient(): ilRpcClient
55 {
56 return ilRpcClientFactory::factory('RPCAdministration');
57 }
58
59 protected function getClientId(): string
60 {
61 return (string) CLIENT_ID;
62 }
63}
Component logger with individual log levels by component id.
__construct(ilSetting $settings, ilLogger $src_logger)
static factory(string $a_package, int $a_timeout=0)
Creates an ilRpcClient instance to our ilServer.
Class ilRpcClient.
ILIAS Setting Class.
const CLIENT_ID
Definition: constants.php:41