Class: Jubatus::Weight::Client::Weight
Instance Method Summary
collapse
Methods included from Common
check_type, check_types
connect, #do_mix, #get_client, #get_config, #get_name, #get_proxy_status, #get_status, #load, #save, #set_name
Constructor Details
#initialize(host, port, name, timeout_sec = 10) ⇒ Weight
Returns a new instance of Weight.
16
17
18
|
# File 'lib/jubatus/weight/client.rb', line 16
def initialize(host, port, name, timeout_sec=10)
super
end
|
Instance Method Details
#calc_weight(d) ⇒ Object
25
26
27
28
|
# File 'lib/jubatus/weight/client.rb', line 25
def calc_weight(d)
@jubatus_client.call("calc_weight", [d], TList.new(TUserDef.new(Feature)),
[TDatum.new])
end
|
#clear ⇒ Object
30
31
32
|
# File 'lib/jubatus/weight/client.rb', line 30
def clear
@jubatus_client.call("clear", [], TBool.new, [])
end
|
#update(d) ⇒ Object
20
21
22
23
|
# File 'lib/jubatus/weight/client.rb', line 20
def update(d)
@jubatus_client.call("update", [d], TList.new(TUserDef.new(Feature)),
[TDatum.new])
end
|