Interface OffsetWriter

  • All Known Implementing Classes:
    FileOffsetWriter

    public interface OffsetWriter
    Interface for recording offset.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      Close all resources used by this class.
      void flush()
      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.
      void markOffset​(String sourceTable, String sourceOffset, boolean isSnapshot)
      Update the offset in memory if the provided offset is greater than the existing offset.
    • Method Detail

      • markOffset

        void 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

          void flush()
          Flush latest offsets to disk.
        • close

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

        Copyright © 2021 JBoss by Red Hat. All rights reserved.