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.



295
296
297
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 295

def initialize
  @events = []
end

Instance Method Details

#each(&blk) ⇒ Object



308
309
310
311
312
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 308

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

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



303
304
305
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 303

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

#sizeObject



299
300
301
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 299

def size
  @events.size
end