Class: Jubatus::Burst::Window
- Inherits:
-
Object
- Object
- Jubatus::Burst::Window
- Includes:
- Common
- Defined in:
- lib/jubatus/burst/types.rb
Constant Summary collapse
Instance Attribute Summary collapse
-
#batches ⇒ Object
readonly
Returns the value of attribute batches.
-
#start_pos ⇒ Object
readonly
Returns the value of attribute start_pos.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(start_pos, batches) ⇒ Window
constructor
A new instance of Window.
- #to_msgpack(out = '') ⇒ Object
- #to_s ⇒ Object
Methods included from Common
Constructor Details
#initialize(start_pos, batches) ⇒ Window
Returns a new instance of Window.
83 84 85 86 |
# File 'lib/jubatus/burst/types.rb', line 83 def initialize(start_pos, batches) @start_pos = start_pos @batches = batches end |
Instance Attribute Details
#batches ⇒ Object (readonly)
Returns the value of attribute batches.
107 108 109 |
# File 'lib/jubatus/burst/types.rb', line 107 def batches @batches end |
#start_pos ⇒ Object (readonly)
Returns the value of attribute start_pos.
107 108 109 |
# File 'lib/jubatus/burst/types.rb', line 107 def start_pos @start_pos end |
Class Method Details
Instance Method Details
#to_msgpack(out = '') ⇒ Object
88 89 90 91 |
# File 'lib/jubatus/burst/types.rb', line 88 def to_msgpack(out = '') t = [@start_pos, @batches] return TYPE.to_msgpack(t) end |
#to_s ⇒ Object
98 99 100 101 102 103 104 105 |
# File 'lib/jubatus/burst/types.rb', line 98 def to_s gen = Jubatus::Common::MessageStringGenerator.new gen.open("window") gen.add("start_pos", @start_pos) gen.add("batches", @batches) gen.close() return gen.to_s end |