Class: Mysql::FlydataBinlogRecordDispatcher
- Inherits:
-
BinlogRecordDispatcher
- Object
- BinlogRecordDispatcher
- Mysql::FlydataBinlogRecordDispatcher
- Defined in:
- lib/flydata/fluent-plugins/mysql/binlog_record_dispatcher.rb
Instance Method Summary collapse
-
#initialize(context) ⇒ FlydataBinlogRecordDispatcher
constructor
A new instance of FlydataBinlogRecordDispatcher.
- #on_delete_rows(record) ⇒ Object
- #on_query(record) ⇒ Object
- #on_rotate(record) ⇒ Object
- #on_update_rows(record) ⇒ Object
- #on_write_rows(record) ⇒ Object
Methods inherited from BinlogRecordDispatcher
Constructor Details
#initialize(context) ⇒ FlydataBinlogRecordDispatcher
Returns a new instance of FlydataBinlogRecordDispatcher.
23 24 25 26 27 28 |
# File 'lib/flydata/fluent-plugins/mysql/binlog_record_dispatcher.rb', line 23 def initialize(context) context.current_binlog_file = "" @context = context @query_dispatcher = FlydataBinlogQueryDispatcher.new(context) @dml_record_handler = DmlRecordHandler.new(context) end |
Instance Method Details
#on_delete_rows(record) ⇒ Object
42 43 44 |
# File 'lib/flydata/fluent-plugins/mysql/binlog_record_dispatcher.rb', line 42 def on_delete_rows(record) @dml_record_handler.process(record, :delete_rows) end |
#on_query(record) ⇒ Object
46 47 48 |
# File 'lib/flydata/fluent-plugins/mysql/binlog_record_dispatcher.rb', line 46 def on_query(record) @query_dispatcher.dispatch(record) end |
#on_rotate(record) ⇒ Object
30 31 32 |
# File 'lib/flydata/fluent-plugins/mysql/binlog_record_dispatcher.rb', line 30 def on_rotate(record) @context.current_binlog_file = record["binlog_file"] end |
#on_update_rows(record) ⇒ Object
38 39 40 |
# File 'lib/flydata/fluent-plugins/mysql/binlog_record_dispatcher.rb', line 38 def on_update_rows(record) @dml_record_handler.process(record, :update_rows) end |
#on_write_rows(record) ⇒ Object
34 35 36 |
# File 'lib/flydata/fluent-plugins/mysql/binlog_record_dispatcher.rb', line 34 def on_write_rows(record) @dml_record_handler.process(record, :write_rows) end |