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.



262
263
264
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 262

def initialize
  @events = []
end

Instance Method Details

#each(&blk) ⇒ Object



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

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

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



266
267
268
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 266

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