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.



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

def initialize
  @events = []
end

Instance Method Details

#each(&blk) ⇒ Object



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

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

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



380
381
382
# File 'lib/logstash/util/wrapped_acked_queue.rb', line 380

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

#sizeObject



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

def size
  @events.size
end