Class: Jubatus::Burst::Batch
- Inherits:
-
Object
- Object
- Jubatus::Burst::Batch
- Includes:
- Common
- Defined in:
- lib/jubatus/burst/types.rb
Constant Summary collapse
Instance Attribute Summary collapse
-
#all_data_count ⇒ Object
readonly
Returns the value of attribute all_data_count.
-
#burst_weight ⇒ Object
readonly
Returns the value of attribute burst_weight.
-
#relevant_data_count ⇒ Object
readonly
Returns the value of attribute relevant_data_count.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(all_data_count, relevant_data_count, burst_weight) ⇒ Batch
constructor
A new instance of Batch.
- #to_msgpack(out = '') ⇒ Object
- #to_s ⇒ Object
Methods included from Common
Constructor Details
#initialize(all_data_count, relevant_data_count, burst_weight) ⇒ Batch
Returns a new instance of Batch.
49 50 51 52 53 |
# File 'lib/jubatus/burst/types.rb', line 49 def initialize(all_data_count, relevant_data_count, burst_weight) @all_data_count = all_data_count @relevant_data_count = relevant_data_count @burst_weight = burst_weight end |
Instance Attribute Details
#all_data_count ⇒ Object (readonly)
Returns the value of attribute all_data_count.
75 76 77 |
# File 'lib/jubatus/burst/types.rb', line 75 def all_data_count @all_data_count end |
#burst_weight ⇒ Object (readonly)
Returns the value of attribute burst_weight.
75 76 77 |
# File 'lib/jubatus/burst/types.rb', line 75 def burst_weight @burst_weight end |
#relevant_data_count ⇒ Object (readonly)
Returns the value of attribute relevant_data_count.
75 76 77 |
# File 'lib/jubatus/burst/types.rb', line 75 def relevant_data_count @relevant_data_count end |
Class Method Details
Instance Method Details
#to_msgpack(out = '') ⇒ Object
55 56 57 58 |
# File 'lib/jubatus/burst/types.rb', line 55 def to_msgpack(out = '') t = [@all_data_count, @relevant_data_count, @burst_weight] return TYPE.to_msgpack(t) end |
#to_s ⇒ Object
65 66 67 68 69 70 71 72 73 |
# File 'lib/jubatus/burst/types.rb', line 65 def to_s gen = Jubatus::Common::MessageStringGenerator.new gen.open("batch") gen.add("all_data_count", @all_data_count) gen.add("relevant_data_count", @relevant_data_count) gen.add("burst_weight", @burst_weight) gen.close() return gen.to_s end |