Class: Flydata::Source::SourcePos
- Defined in:
- lib/flydata/source/source_pos.rb
Direct Known Subclasses
Flydata::SourceMysql::SourcePos, Flydata::SourceOracle::SourcePos, Flydata::SourcePostgresql::SourcePos
Class Method Summary collapse
Instance Method Summary collapse
-
#create_source_pos(source_pos_str) ⇒ Object
Public Interface: Create source pos.
-
#initialize(source) ⇒ SourcePos
constructor
A new instance of SourcePos.
-
#resume_pos(source_pos) ⇒ Object
Public Interface: Back to last known safe source pos.
Constructor Details
#initialize(source) ⇒ SourcePos
Returns a new instance of SourcePos.
13 14 15 |
# File 'lib/flydata/source/source_pos.rb', line 13 def initialize(source) super(source) end |
Class Method Details
Instance Method Details
#create_source_pos(source_pos_str) ⇒ Object
Public Interface: Create source pos
Returns a context-dependent position object that has the following methods: (includeng Comparable mixin is preferable)
-
all comparison operators (<=>, <, <=, >=, >, ==, !=)
-
to_s
25 26 27 |
# File 'lib/flydata/source/source_pos.rb', line 25 def create_source_pos(source_pos_str) raise UnsupportedSourceError, "subclass must implement" end |
#resume_pos(source_pos) ⇒ Object
Public Interface: Back to last known safe source pos
Returns a source position object
A source pos may not be restart-able from the very position because there may be preceding records necessary to restart the source log playback. This method returns such a ‘safe’ position from which the source log can be played back.
38 39 40 |
# File 'lib/flydata/source/source_pos.rb', line 38 def resume_pos(source_pos) raise UnsupportedSourceError, "subclass must implement" end |