Class: Jubatus::Weight::Client::Weight
- Inherits:
-
Common::ClientBase
- Object
- Common::ClientBase
- Jubatus::Weight::Client::Weight
- Includes:
- Common
- Defined in:
- lib/jubatus/weight/client.rb
Instance Method Summary collapse
- #calc_weight(d) ⇒ Object
- #clear ⇒ Object
-
#initialize(host, port, name, timeout_sec = 10) ⇒ Weight
constructor
A new instance of Weight.
- #update(d) ⇒ Object
Methods included from Common
Methods inherited from Common::ClientBase
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 |