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.



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

def initialize
  @events = []
end

Instance Method Details

#each(&blk) ⇒ Object



391
392
393
394
395
# File 'lib/logstash/util/wrapped_acked_queue.rb', line 391

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

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



386
387
388
# File 'lib/logstash/util/wrapped_acked_queue.rb', line 386

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

#sizeObject



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

def size
  @events.size
end