Class: Flydata::Source::Sync
- Defined in:
- lib/flydata/source/sync.rb
Direct Known Subclasses
Flydata::SourceFile::Sync, Flydata::SourceMysql::Sync, Flydata::SourcePostgresql::Sync
Class Method Summary collapse
Instance Method Summary collapse
-
#data_servers ⇒ Object
Public Interface: Data Servers.
-
#forwarder ⇒ Object
Public Interface: Forwarder.
-
#setup ⇒ Object
Public Interface: Set up data source.
-
#supported? ⇒ Boolean
Public Interface: Tells if the source support sync or not.
-
#table_lists ⇒ Object
Public Interface: Table lists.
Methods inherited from Component
Constructor Details
This class inherits a constructor from Flydata::Source::Component
Class Method Details
Instance Method Details
#data_servers ⇒ Object
Public Interface: Data Servers
Returns a comma separated list of data servers to which the agent sends data
43 44 45 |
# File 'lib/flydata/source/sync.rb', line 43 def data_servers raise UnsupportedSourceError, "subclass must implement" end |
#forwarder ⇒ Object
Public Interface: Forwarder
Returns a forwarder type in string. Values are ‘tcpforwarder’ or ‘sslforwarder’.
50 51 52 |
# File 'lib/flydata/source/sync.rb', line 50 def forwarder raise UnsupportedSourceError, "subclass must implement" end |
#setup ⇒ Object
Public Interface: Set up data source
Called right after the source instance is created. Perform one-time setup which is necessary to initialize the source for sync (and sync only)
Raises exception when the source does not support sync
19 20 21 |
# File 'lib/flydata/source/sync.rb', line 19 def setup raise UnsupportedSourceError,"subclass must implement" end |
#supported? ⇒ Boolean
Public Interface: Tells if the source support sync or not
Returns true if the source supports sync. No otherwise.
26 27 28 |
# File 'lib/flydata/source/sync.rb', line 26 def supported? raise UnsupportedSourceError, "subclass must implement" end |
#table_lists ⇒ Object
Public Interface: Table lists
Returns lists of tables in a hash. The following lists will be returned
"tables" : An array of tables currently in sync
"new_tables" : An array of tables for which no generate_table_ddl has been run yet
"invalid_tables" : An array of tables that had an issue starting sync
36 37 38 |
# File 'lib/flydata/source/sync.rb', line 36 def table_lists raise UnsupportedSourceError, "subclass must implement" end |