Module: Droonga::Pluggable
- Included in:
- Adapter, Collector, Distributor, Handler
- Defined in:
- lib/droonga/pluggable.rb
Instance Method Summary collapse
Instance Method Details
#process(command, *arguments) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/droonga/pluggable.rb', line 32 def process(command, *arguments) plugin = find_plugin(command) $log.trace("#{log_tag}: process: start: <#{command}>", :plugin => plugin.class) if plugin.nil? raise "unknown plugin: <#{command}>: " + "TODO: improve error handling" end plugin.process(command, *arguments) $log.trace("#{log_tag}: process: done: <#{command}>", :plugin => plugin.class) end |
#processable?(command) ⇒ Boolean
28 29 30 |
# File 'lib/droonga/pluggable.rb', line 28 def processable?(command) not find_plugin(command).nil? end |
#shutdown ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/droonga/pluggable.rb', line 20 def shutdown $log.trace("#{log_tag}: shutdown: plugin: start") @plugins.each do |plugin| plugin.shutdown end $log.trace("#{log_tag}: shutdown: plugin: done") end |