Class: Fluent::ObjectBufferedOutput
- Inherits:
-
BufferedOutput
- Object
- Output
- BufferedOutput
- Fluent::ObjectBufferedOutput
- Defined in:
- lib/fluent/output.rb
Direct Known Subclasses
Defined Under Namespace
Modules: BufferedEventStreamMixin
Constant Summary
Constants included from Configurable
Configurable::CONFIG_TYPE_REGISTRY
Instance Attribute Summary
Attributes inherited from Output
Attributes included from PluginLoggerMixin
Instance Method Summary collapse
- #emit(tag, es, chain) ⇒ Object
-
#initialize ⇒ ObjectBufferedOutput
constructor
A new instance of ObjectBufferedOutput.
- #write(chunk) ⇒ Object
Methods inherited from BufferedOutput
#before_shutdown, #calc_retry_wait, #configure, #enqueue_buffer, #flush_secondary, #force_flush, #format_stream, #shutdown, #start, #submit_flush, #try_flush, #write_abort
Methods inherited from Output
#configure, #secondary_init, #shutdown, #start
Methods included from PluginLoggerMixin
Methods included from PluginId
Methods included from Configurable
#config, #configure, included, lookup_type, register_type
Constructor Details
#initialize ⇒ ObjectBufferedOutput
Returns a new instance of ObjectBufferedOutput.
449 450 451 |
# File 'lib/fluent/output.rb', line 449 def initialize super end |
Instance Method Details
#emit(tag, es, chain) ⇒ Object
453 454 455 456 457 458 459 460 |
# File 'lib/fluent/output.rb', line 453 def emit(tag, es, chain) @emit_count += 1 data = es.to_msgpack_stream key = tag if @buffer.emit(key, data, chain) submit_flush end end |
#write(chunk) ⇒ Object
478 479 480 481 |
# File 'lib/fluent/output.rb', line 478 def write(chunk) chunk.extend(BufferedEventStreamMixin) write_objects(chunk.key, chunk) end |