Interface LogTailer<M extends Externalizable>

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
KafkaLogTailer, MemCompoundLogTailer, MemLogTailer

public interface LogTailer<M extends Externalizable> extends AutoCloseable
Sequential reader for a partition or multiple partitions. A tailer is not thread safe and should not be shared by multiple threads.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the list of Log name, partitions tuples currently assigned to this tailer.
    void
     
    boolean
    Returns true if the tailer has been closed.
    void
    Commit current positions for all partitions (last message offset returned by read).
    commit(LogPartition partition)
    Commit current position for the partition.
    Returns the codec used to read the records.
    Returns the consumer group.
    offsetForTimestamp(LogPartition partition, long timestamp)
    Look up the offset for the given partition by timestamp.
    read(Duration timeout)
    Read a message from assigned partitions within the timeout.
    void
    Reset all committed positions for this group, next read will be done from beginning.
    void
    reset(LogPartition partition)
    Reset the committed position for this group on this partition, next read for this partition will be done from the beginning.
    void
    seek(LogOffset offset)
    Set the current position for a single partition.
    void
    Set the current positions to the end of all partitions.
    void
    Set the current positions to previously committed positions.
    void
    Set the current positions to the beginning of all partitions.