Class: LogStash::Util::WrappedAckedQueue::WriteBatch
- Inherits:
-
Object
- Object
- LogStash::Util::WrappedAckedQueue::WriteBatch
- Defined in:
- lib/logstash/util/wrapped_acked_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.
342 343 344 |
# File 'lib/logstash/util/wrapped_acked_queue.rb', line 342 def initialize @events = [] end |
Instance Method Details
#each(&blk) ⇒ Object
351 352 353 354 355 |
# File 'lib/logstash/util/wrapped_acked_queue.rb', line 351 def each(&blk) @events.each do |e| blk.call(e) end end |
#push(event) ⇒ Object Also known as: <<
346 347 348 |
# File 'lib/logstash/util/wrapped_acked_queue.rb', line 346 def push(event) @events.push(event) end |