Interface ObserveHandle

  • All Superinterfaces:
    java.lang.AutoCloseable

    @Stable
    public interface ObserveHandle
    extends java.lang.AutoCloseable
    A interface for handling progress and control consumption of running observe process.
    • Method Detail

      • close

        void close()
        Stop the consumption.
        Specified by:
        close in interface java.lang.AutoCloseable
      • getCommittedOffsets

        java.util.List<Offset> getCommittedOffsets()
        Retrieve currently committed offsets.
        Returns:
        list of offsets that have been committed for each partition assigned to the observation
      • resetOffsets

        void resetOffsets​(java.util.List<Offset> offsets)
        Reset the consumption to given offsets.
        Parameters:
        offsets - the offsets to reset the processing to
      • getCurrentOffsets

        java.util.List<Offset> getCurrentOffsets()
        Returns:
        list of last processed element from each assigned partition.
      • waitUntilReady

        void waitUntilReady()
                     throws java.lang.InterruptedException
        Wait until the consumer is ready to read data.
        Throws:
        java.lang.InterruptedException - when interrupted before the wait is done