Class: LogStash::Util::WrappedAckedQueue::WriteBatch

Inherits:
Object
  • Object
show all
Defined in:
lib/logstash/util/wrapped_acked_queue.rb

Instance Method Summary collapse

Constructor Details

#initializeWriteBatch

Returns a new instance of WriteBatch.



369
370
371
# File 'lib/logstash/util/wrapped_acked_queue.rb', line 369

def initialize
  @events = []
end

Instance Method Details

#each(&blk) ⇒ Object



382
383
384
385
386
# File 'lib/logstash/util/wrapped_acked_queue.rb', line 382

def each(&blk)
  @events.each do |e|
    blk.call(e)
  end
end

#push(event) ⇒ Object Also known as: <<



377
378
379
# File 'lib/logstash/util/wrapped_acked_queue.rb', line 377

def push(event)
  @events.push(event)
end

#sizeObject



373
374
375
# File 'lib/logstash/util/wrapped_acked_queue.rb', line 373

def size
  @events.size
end