Interface OffsetWriter

All Known Implementing Classes:
FileOffsetWriter

public interface OffsetWriter
Interface for recording offset.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close all resources used by this class.
    Flush latest offsets to disk.
    boolean
    isOffsetProcessed(String sourceTable, String sourceOffset, boolean isSnapshot)
    Determine if an offset has been processed based on the table name, offset position, and whether it is from snapshot or not.
    markOffset(String sourceTable, String sourceOffset, boolean isSnapshot)
    Update the offset in memory if the provided offset is greater than the existing offset.
  • Method Details

    • markOffset

      Future<?> markOffset(String sourceTable, String sourceOffset, boolean isSnapshot)
      Update the offset in memory if the provided offset is greater than the existing offset.
      Parameters:
      sourceTable - string in the format of ..
      sourceOffset - string in the format of :
      isSnapshot - whether the offset is coming from a snapshot or commit log
    • isOffsetProcessed

      boolean isOffsetProcessed(String sourceTable, String sourceOffset, boolean isSnapshot)
      Determine if an offset has been processed based on the table name, offset position, and whether it is from snapshot or not.
      Parameters:
      sourceTable - string in the format of .
    • .
      sourceOffset - string in the format of :
      isSnapshot - whether the offset is coming from a snapshot or commit log
      Returns:
      true if the offset has been processed, false otherwise.
    • flush

      Future<?> flush()
      Flush latest offsets to disk.
    • close

      void close()
      Close all resources used by this class.