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.
250 251 252 |
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 250 def initialize(queue) @queue = queue end |
Instance Method Details
#get_new_batch ⇒ Object
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 |