Class StartupOptions

    • Field Detail

      • specificOffsetFile

        public final String specificOffsetFile
      • specificOffsetPos

        public final Integer specificOffsetPos
      • startupTimestampMillis

        public final Long startupTimestampMillis
    • Method Detail

      • initial

        public static StartupOptions initial()
        Performs an initial snapshot on the monitored database tables upon first startup, and continue to read the latest change log.
      • snapshot

        public static StartupOptions snapshot()
        Performs an initial snapshot on the monitored database tables upon first startup, and not read the change log anymore .
      • earliest

        public static StartupOptions earliest()
        Never to perform snapshot on the monitored database tables upon first startup, just read from the beginning of the change log. This should be used with care, as it is only valid when the change log is guaranteed to contain the entire history of the database.
      • latest

        public static StartupOptions latest()
        Never to perform snapshot on the monitored database tables upon first startup, just read from the end of the change log which means only have the changes since the connector was started.
      • committed

        public static StartupOptions committed()
        Never to perform snapshot on the monitored database tables upon first startup, just read from the previous committed posistion of the change log which means only have the changes since the connector last stopped.
      • specificOffset

        public static StartupOptions specificOffset​(String specificOffsetFile,
                                                    int specificOffsetPos)
        Never to perform snapshot on the monitored database tables upon first startup, and directly read change log from the specified offset.
      • timestamp

        public static StartupOptions timestamp​(long startupTimestampMillis)
        Never to perform snapshot on the monitored database tables upon first startup, and directly read change log from the specified timestamp.

        The consumer will traverse the change log from the beginning and ignore change events whose timestamp is smaller than the specified timestamp.

        Parameters:
        startupTimestampMillis - timestamp for the startup offsets, as milliseconds from epoch.
      • isStreamOnly

        public boolean isStreamOnly()
      • isSnapshotOnly

        public boolean isSnapshotOnly()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object