Class: Storm::DistributedRPCInvocations::Client

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

Instance Method Summary collapse

Instance Method Details

#failRequest(id) ⇒ Object



45
46
47
48
# File 'lib/storm/thrift/distributed_r_p_c_invocations.rb', line 45

def failRequest(id)
  send_failRequest(id)
  recv_failRequest()
end

#fetchRequest(functionName) ⇒ Object



30
31
32
33
# File 'lib/storm/thrift/distributed_r_p_c_invocations.rb', line 30

def fetchRequest(functionName)
  send_fetchRequest(functionName)
  return recv_fetchRequest()
end

#recv_failRequestObject



54
55
56
57
# File 'lib/storm/thrift/distributed_r_p_c_invocations.rb', line 54

def recv_failRequest()
  result = receive_message(FailRequest_result)
  return
end

#recv_fetchRequestObject

Raises:

  • (::Thrift::ApplicationException)


39
40
41
42
43
# File 'lib/storm/thrift/distributed_r_p_c_invocations.rb', line 39

def recv_fetchRequest()
  result = receive_message(FetchRequest_result)
  return result.success unless result.success.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetchRequest failed: unknown result')
end

#recv_resultObject



25
26
27
28
# File 'lib/storm/thrift/distributed_r_p_c_invocations.rb', line 25

def recv_result()
  result = receive_message(Result_result)
  return
end

#result(id, result) ⇒ Object



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

def result(id, result)
  send_result(id, result)
  recv_result()
end

#send_failRequest(id) ⇒ Object



50
51
52
# File 'lib/storm/thrift/distributed_r_p_c_invocations.rb', line 50

def send_failRequest(id)
  send_message('failRequest', FailRequest_args, :id => id)
end

#send_fetchRequest(functionName) ⇒ Object



35
36
37
# File 'lib/storm/thrift/distributed_r_p_c_invocations.rb', line 35

def send_fetchRequest(functionName)
  send_message('fetchRequest', FetchRequest_args, :functionName => functionName)
end

#send_result(id, result) ⇒ Object



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

def send_result(id, result)
  send_message('result', Result_args, :id => id, :result => result)
end