Class: Fluent::Plugin::BufferedNullOutput
- Defined in:
- lib/fluent/plugin/out_buffered_null.rb
Constant Summary
Constants inherited from Output
Output::CHUNKING_FIELD_WARN_NUM, Output::CHUNK_KEY_PATTERN, Output::CHUNK_KEY_PLACEHOLDER_PATTERN, Output::FORMAT_MSGPACK_STREAM, Output::FORMAT_MSGPACK_STREAM_TIME_INT
Constants included from Configurable
Configurable::CONFIG_TYPE_REGISTRY
Instance Attribute Summary collapse
-
#delayed ⇒ Object
Returns the value of attribute delayed.
-
#feed_proc ⇒ Object
Returns the value of attribute feed_proc.
Attributes inherited from Output
#as_secondary, #buffer, #chunk_key_tag, #chunk_key_time, #chunk_keys, #delayed_commit, #delayed_commit_timeout, #emit_count, #emit_records, #in_tests, #num_errors, #output_enqueue_thread_waiting, #retry, #rollback_count, #secondary, #write_count
Attributes included from Fluent::PluginLoggerMixin
Instance Method Summary collapse
-
#initialize ⇒ BufferedNullOutput
constructor
A new instance of BufferedNullOutput.
- #prefer_delayed_commit ⇒ Object
- #try_write(chunk) ⇒ Object
- #write(chunk) ⇒ Object
Methods inherited from Output
#acts_as_secondary, #after_shutdown, #after_start, #before_shutdown, #close, #commit_write, #configure, #emit_buffered, #emit_events, #emit_sync, #enqueue_thread_run, #enqueue_thread_wait, #execute_chunking, #extract_placeholders, #flush_thread_run, #flush_thread_wakeup, #force_flush, #format, #handle_stream_simple, #handle_stream_with_custom_format, #handle_stream_with_standard_format, #implement?, #interrupt_flushes, #metadata, #next_flush_time, #prefer_buffered_processing, #process, #retry_state, #rollback_write, #shutdown, #start, #stop, #submit_flush_all, #submit_flush_once, #support_in_v12_style?, #terminate, #try_flush, #try_rollback_all, #try_rollback_write, #write_guard
Methods included from UniqueId::Mixin
#dump_unique_id_hex, #generate_unique_id
Methods included from Fluent::PluginHelper::Mixin
Methods included from Fluent::PluginLoggerMixin
#configure, included, #start, #terminate
Methods included from Fluent::PluginId
#configure, #plugin_id, #plugin_id_configured?, #plugin_id_for_test?
Methods inherited from Base
#after_shutdown, #after_shutdown?, #after_start, #after_started?, #before_shutdown, #before_shutdown?, #close, #closed?, #configure, #configured?, #has_router?, #inspect, #shutdown, #shutdown?, #start, #started?, #stop, #stopped?, #terminate, #terminated?
Methods included from SystemConfig::Mixin
#system_config, #system_config_override
Methods included from Configurable
#config, #configure, included, lookup_type, register_type
Constructor Details
#initialize ⇒ BufferedNullOutput
Returns a new instance of BufferedNullOutput.
33 34 35 36 37 |
# File 'lib/fluent/plugin/out_buffered_null.rb', line 33 def initialize super @delayed = false @feed_proc = nil end |
Instance Attribute Details
#delayed ⇒ Object
Returns the value of attribute delayed.
31 32 33 |
# File 'lib/fluent/plugin/out_buffered_null.rb', line 31 def delayed @delayed end |
#feed_proc ⇒ Object
Returns the value of attribute feed_proc.
31 32 33 |
# File 'lib/fluent/plugin/out_buffered_null.rb', line 31 def feed_proc @feed_proc end |
Instance Method Details
#prefer_delayed_commit ⇒ Object
39 40 41 |
# File 'lib/fluent/plugin/out_buffered_null.rb', line 39 def prefer_delayed_commit @delayed end |
#try_write(chunk) ⇒ Object
51 52 53 54 55 56 57 |
# File 'lib/fluent/plugin/out_buffered_null.rb', line 51 def try_write(chunk) if @feed_proc @feed_proc.call(chunk) else # ignore chunk.read end end |
#write(chunk) ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/fluent/plugin/out_buffered_null.rb', line 43 def write(chunk) if @feed_proc @feed_proc.call(chunk) else # ignore chunk.read end end |