Class DBChangelogConnector

  • All Implemented Interfaces:
    ChangelogInterface, ConnectorInterface, SkipLookupInterface, VersionInfoInterface

    public class DBChangelogConnector
    extends JDBCConnector
    implements ConnectorInterface, ChangelogInterface
    The DBChangelogConnector provides a way to to detect changes in specific RDBMS tables. The Connector connects to the underline database through JDBC driver and creates Entries from specific 'change table' containing one record per modified record in the target table.

    The Connector regularly saves current state into the System Store to avoid duplications when retrieving Entries. Records can also be deleted after the retrieving.

    • Constructor Detail

      • DBChangelogConnector

        public DBChangelogConnector()
        Constructor for the DBChangelogConnector object.
    • Method Detail

      • initialize

        public void initialize​(java.lang.Object o)
                        throws java.lang.Exception
        Reads Connector parameter's values and initialize the Connector.
        Specified by:
        initialize in interface ConnectorInterface
        Overrides:
        initialize in class JDBCConnector
        Parameters:
        o - Socket object, ConnectorMode object or null
        Throws:
        java.lang.Exception - If invalid Connector parameter values are supplied.
      • reselect

        public void reselect()
                      throws java.lang.Exception
        Retrieves records from the 'change table' using the current value of the StateKey. If StateKey is:
      • null and 'Remove Processed Row' parameter is true - the processed rows are deleted from the 'change table'

      • null and 'Remove Processed Row' parameter is false - all entries are retrieved

      • not null - only entries with ibmsnap_commitseq > StateKey are retrieved
Throws:
java.lang.Exception - If an error occurs while retrieving records from the database