Class: Solr::Cloud::Configuration
- Inherits:
-
Object
- Object
- Solr::Cloud::Configuration
- Defined in:
- lib/solr/cloud/configuration.rb
Instance Attribute Summary collapse
-
#collections_state_manager ⇒ Object
readonly
Returns the value of attribute collections_state_manager.
-
#zookeeper_auth_password ⇒ Object
Returns the value of attribute zookeeper_auth_password.
-
#zookeeper_auth_user ⇒ Object
Returns the value of attribute zookeeper_auth_user.
-
#zookeeper_url ⇒ Object
Returns the value of attribute zookeeper_url.
Instance Method Summary collapse
- #build_zookeeper_connection ⇒ Object
- #cloud_enabled? ⇒ Boolean
- #enable_solr_cloud!(collections) ⇒ Object
Instance Attribute Details
#collections_state_manager ⇒ Object (readonly)
Returns the value of attribute collections_state_manager.
9 10 11 |
# File 'lib/solr/cloud/configuration.rb', line 9 def collections_state_manager @collections_state_manager end |
#zookeeper_auth_password ⇒ Object
Returns the value of attribute zookeeper_auth_password.
7 8 9 |
# File 'lib/solr/cloud/configuration.rb', line 7 def zookeeper_auth_password @zookeeper_auth_password end |
#zookeeper_auth_user ⇒ Object
Returns the value of attribute zookeeper_auth_user.
7 8 9 |
# File 'lib/solr/cloud/configuration.rb', line 7 def zookeeper_auth_user @zookeeper_auth_user end |
#zookeeper_url ⇒ Object
Returns the value of attribute zookeeper_url.
7 8 9 |
# File 'lib/solr/cloud/configuration.rb', line 7 def zookeeper_url @zookeeper_url end |
Instance Method Details
#build_zookeeper_connection ⇒ Object
20 21 22 23 24 25 |
# File 'lib/solr/cloud/configuration.rb', line 20 def build_zookeeper_connection zookeeper_url = zookeeper_url.is_a?(Array) ? zookeeper_url.join(',') : zookeeper_url Solr::Cloud::ZookeeperConnection.new(zookeeper_url: zookeeper_url, zookeeper_auth_user: zookeeper_auth_user, zookeeper_auth_password: zookeeper_auth_password) end |
#cloud_enabled? ⇒ Boolean
16 17 18 |
# File 'lib/solr/cloud/configuration.rb', line 16 def cloud_enabled? !@collections_state_manager.nil? end |
#enable_solr_cloud!(collections) ⇒ Object
11 12 13 14 |
# File 'lib/solr/cloud/configuration.rb', line 11 def enable_solr_cloud!(collections) @collections_state_manager = Solr::Cloud::CollectionsStateManager.new(zookeeper: build_zookeeper_connection, collections: collections) end |