Class: LogStash::Util::WrappedSynchronousQueue::WriteClient
- Inherits:
-
Object
- Object
- LogStash::Util::WrappedSynchronousQueue::WriteClient
- Defined in:
- lib/logstash/util/wrapped_synchronous_queue.rb
Instance Method Summary collapse
- #get_new_batch ⇒ Object
-
#initialize(queue) ⇒ WriteClient
constructor
A new instance of WriteClient.
- #push(event) ⇒ Object (also: #<<)
- #push_batch(batch) ⇒ Object
Constructor Details
#initialize(queue) ⇒ WriteClient
Returns a new instance of WriteClient.
274 275 276 |
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 274 def initialize(queue) @queue = queue end |
Instance Method Details
#get_new_batch ⇒ Object
278 279 280 |
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 278 def get_new_batch WriteBatch.new end |
#push(event) ⇒ Object Also known as: <<
282 283 284 |
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 282 def push(event) @queue.push(event) end |
#push_batch(batch) ⇒ Object
287 288 289 290 291 |
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 287 def push_batch(batch) batch.each do |event| push(event) end end |