Interface Pusher


public interface Pusher
Used for proactively replicating (pushing) records for partitions led by this broker to its follower brokers. Records for partitions handled by the pusher are buffered within it and are regularly sent to followers.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    id()
    An identifier of this pusher thread expected to be between 0 and N-1 where N is the total number of pusher threads on this broker.
    void
    onHighWatermarkUpdate(org.apache.kafka.server.common.TopicIdPartition partition, int destinationBrokerId, long highWatermark)
    Should be called whenever the high watermark for a push-replicated partition replica is updated.
    void
    onLeaderAppend(org.apache.kafka.server.common.TopicIdPartition partition, int destinationBrokerId, long appendOffset, org.apache.kafka.common.record.AbstractRecords records)
    Buffers the given records to be replicated with some subsequent AppendRecords request.
    void
    onLogStartOffsetUpdate(org.apache.kafka.server.common.TopicIdPartition topicPartition, int destinationBrokerId, long logStartOffset)
    Should be called whenever the log start offset for a push-replicated partition replica is updated.
    void
    Shuts this pusher down, terminating all its push replication processing.
    void
    Starts the pusher thread.
    void
    startPush(org.apache.kafka.server.common.TopicIdPartition partition, PushSession pushSession)
    Adds this partition replica with its push replication session metadata to the set of partitions for which this pusher will be sending AppendRecords requests.
    void
    stopPush(org.apache.kafka.server.common.TopicIdPartition partition, int destinationBrokerId, PushSessionEndReason pushSessionEndReason)
    Stops the push replication session for the given partition, optionally preparing an AppendRecords request signaling the stoppage.