Class: LogStash::Util::WrappedSynchronousQueue::WriteBatch

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

Instance Method Summary collapse

Constructor Details

#initializeWriteBatch

Returns a new instance of WriteBatch.



271
272
273
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 271

def initialize
  @events = []
end

Instance Method Details

#each(&blk) ⇒ Object



280
281
282
283
284
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 280

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

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



275
276
277
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 275

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