Class: Storm::DistributedRPC::Client

Inherits:
Object
  • Object
show all
Includes:
Thrift::Client
Defined in:
lib/storm/thrift/distributed_r_p_c.rb

Instance Method Summary collapse

Instance Method Details

#execute(functionName, funcArgs) ⇒ Object



16
17
18
19
# File 'lib/storm/thrift/distributed_r_p_c.rb', line 16

def execute(functionName, funcArgs)
  send_execute(functionName, funcArgs)
  return recv_execute()
end

#recv_executeObject

Raises:

  • (::Thrift::ApplicationException)


25
26
27
28
29
30
# File 'lib/storm/thrift/distributed_r_p_c.rb', line 25

def recv_execute()
  result = receive_message(Execute_result)
  return result.success unless result.success.nil?
  raise result.e unless result.e.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'execute failed: unknown result')
end

#send_execute(functionName, funcArgs) ⇒ Object



21
22
23
# File 'lib/storm/thrift/distributed_r_p_c.rb', line 21

def send_execute(functionName, funcArgs)
  send_message('execute', Execute_args, :functionName => functionName, :funcArgs => funcArgs)
end