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: #<<)
- #size ⇒ Object
Constructor Details
#initialize ⇒ WriteBatch
Returns a new instance of WriteBatch.
387 388 389 |
# File 'lib/logstash/util/wrapped_acked_queue.rb', line 387 def initialize @events = [] end |
Instance Method Details
#each(&blk) ⇒ Object
400 401 402 403 404 |
# File 'lib/logstash/util/wrapped_acked_queue.rb', line 400 def each(&blk) @events.each do |e| blk.call(e) end end |
#push(event) ⇒ Object Also known as: <<
395 396 397 |
# File 'lib/logstash/util/wrapped_acked_queue.rb', line 395 def push(event) @events.push(event) end |
#size ⇒ Object
391 392 393 |
# File 'lib/logstash/util/wrapped_acked_queue.rb', line 391 def size @events.size end |