Class: Droonga::Serf::RemoteCommand::SetReplicas
- Inherits:
-
ModifyReplicasBase
- Object
- Base
- ModifyReplicasBase
- Droonga::Serf::RemoteCommand::SetReplicas
- Defined in:
- lib/droonga/serf/remote_command.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#initialize, #log, #should_process?
Constructor Details
This class inherits a constructor from Droonga::Serf::RemoteCommand::Base
Instance Method Details
#process ⇒ Object
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/droonga/serf/remote_command.rb', line 262 def process return if dataset.nil? or hosts.nil? log("new replicas: #{hosts.join(",")}") log("joining to the cluster") @serf.join(*hosts) log("setting replicas to the cluster") Catalog::Modifier.new(catalog).modify do |modifier, file| modifier.datasets[dataset].replicas.hosts = hosts @service_installation.(file) end log("done") end |