Class: LogStash::Util::WrappedSynchronousQueue::WriteBatch
- Inherits:
-
Object
- Object
- LogStash::Util::WrappedSynchronousQueue::WriteBatch
- Defined in:
- lib/logstash/util/wrapped_synchronous_queue.rb
Instance Method Summary collapse
- #each(&blk) ⇒ Object
-
#initialize ⇒ WriteBatch
constructor
A new instance of WriteBatch.
- #push(event) ⇒ Object (also: #<<)
Constructor Details
#initialize ⇒ WriteBatch
Returns a new instance of WriteBatch.
271 272 273 |
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 271 def initialize @events = [] end |
Instance Method Details
#each(&blk) ⇒ Object
280 281 282 283 284 |
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 280 def each(&blk) @events.each do |e| blk.call(e) end end |
#push(event) ⇒ Object Also known as: <<
275 276 277 |
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 275 def push(event) @events.push(event) end |