Class: Norikra::Listener::MemoryPool
- Defined in:
- lib/norikra/listener.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#output_pool ⇒ Object
writeonly
Sets the attribute output_pool.
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
#apply_type_convert_to_events, #background, #initialize, #push, #shutdown, #start, #type_convert, #update
Constructor Details
This class inherits a constructor from Norikra::Listener::Base
Instance Attribute Details
#output_pool=(value) ⇒ Object (writeonly)
Sets the attribute output_pool
189 190 191 |
# File 'lib/norikra/listener.rb', line 189 def output_pool=(value) @output_pool = value end |
Class Method Details
.label ⇒ Object
191 192 193 |
# File 'lib/norikra/listener.rb', line 191 def self.label nil # Memory pool listener is built-in and implicit listener end |
Instance Method Details
#process_sync(news, olds) ⇒ Object
195 196 197 198 199 200 201 |
# File 'lib/norikra/listener.rb', line 195 def process_sync(news, olds) t = Time.now.to_i if news.respond_to?(:map) events = news.map{|e| [t, e]} @output_pool.push(@query_name, @query_group, events) end end |