Class: Droonga::DistributorPlugin
- Extended by:
- PluginRegisterable
- Defined in:
- lib/droonga/distributor_plugin.rb
Direct Known Subclasses
CRUDDistributor, GroongaDistributor, SearchDistributor, WatchDistributor
Instance Method Summary collapse
- #broadcast_all(message) ⇒ Object
- #distribute(message) ⇒ Object
-
#initialize(distributor) ⇒ DistributorPlugin
constructor
A new instance of DistributorPlugin.
- #scatter_all(message, key) ⇒ Object
Methods included from PluginRegisterable
command, extended, inherited, method_name, processable?, repository
Methods inherited from Plugin
#process, #processable?, #shutdown, #start
Constructor Details
#initialize(distributor) ⇒ DistributorPlugin
Returns a new instance of DistributorPlugin.
24 25 26 27 |
# File 'lib/droonga/distributor_plugin.rb', line 24 def initialize(distributor) super() @distributor = distributor end |
Instance Method Details
#broadcast_all(message) ⇒ Object
38 39 40 41 |
# File 'lib/droonga/distributor_plugin.rb', line 38 def broadcast_all() = [reducer(), gatherer(), broadcaster()] distribute() end |
#distribute(message) ⇒ Object
29 30 31 |
# File 'lib/droonga/distributor_plugin.rb', line 29 def distribute() @distributor.distribute() end |
#scatter_all(message, key) ⇒ Object
33 34 35 36 |
# File 'lib/droonga/distributor_plugin.rb', line 33 def scatter_all(, key) = [reducer(), gatherer(), scatterer(, key)] distribute() end |