Class: LogStash::Util::WrappedSynchronousQueue::WriteClient

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

Instance Method Summary collapse

Constructor Details

#initialize(queue) ⇒ WriteClient

Returns a new instance of WriteClient.



250
251
252
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 250

def initialize(queue)
  @queue = queue
end

Instance Method Details

#get_new_batchObject



254
255
256
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 254

def get_new_batch
  WriteBatch.new
end

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



258
259
260
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 258

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

#push_batch(batch) ⇒ Object



263
264
265
266
267
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 263

def push_batch(batch)
  batch.each do |event|
    push(event)
  end
end