MORI Daijiro
null+****@clear*****
Fri Oct 11 14:27:19 JST 2013
MORI Daijiro 2013-10-11 14:27:19 +0900 (Fri, 11 Oct 2013) New Revision: 91d7bba94fb0f1d15c9378caf350e27fdbc79e3f https://github.com/droonga/fluent-plugin-droonga/commit/91d7bba94fb0f1d15c9378caf350e27fdbc79e3f Message: Add some adapters. Modified files: lib/droonga/adapter.rb Modified: lib/droonga/adapter.rb (+32 -0) =================================================================== --- lib/droonga/adapter.rb 2013-10-10 02:00:13 +0900 (52631e0) +++ lib/droonga/adapter.rb 2013-10-11 14:27:19 +0900 (9e118b2) @@ -62,6 +62,24 @@ module Droonga broadcast_all(request) end + command :feed + def subscribe(request) + puts "adapter received #{request}" + broadcast_all(request) + end + + command :watch + def watch(request) + puts "adapter received #{request}" + broadcast_all(request) + end + + command :unwatch + def watch(request) + puts "adapter received #{request}" + broadcast_all(request) + end + command :add def add(request) # TODO: update events must be serialized in the primary node of replicas. @@ -69,6 +87,20 @@ module Droonga scatter_all(request, key) end + command :update + def update(request) + # TODO: update events must be serialized in the primary node of replicas. + key = request["key"] || rand.to_s + scatter_all(request, key) + end + + command :reset + def add(request) + # TODO: update events must be serialized in the primary node of replicas. + key = request["key"] || rand.to_s + scatter_all(request, key) + end + command :search def search(request) message = [] -------------- next part -------------- HTML����������������������������...Download