class Aggro::Handler::GetEvents
Private: Handler
for incoming command requests.
Public Instance Methods
call()
click to toggle source
# File lib/aggro/handler/get_events.rb, line 5 def call local? ? handle_local : handle_foreign end
Private Instance Methods
handle_foreign()
click to toggle source
# File lib/aggro/handler/get_events.rb, line 17 def handle_foreign Message::Ask.new locator.primary_node.id end
handle_local()
click to toggle source
# File lib/aggro/handler/get_events.rb, line 11 def handle_local events = Aggro.store.read([message.id]).first.events Message::Events.new(message.id, events.to_a) end
local?()
click to toggle source
# File lib/aggro/handler/get_events.rb, line 21 def local? locator.local? end
locator()
click to toggle source
# File lib/aggro/handler/get_events.rb, line 25 def locator @locator ||= Locator.new(message.id) end