public int epoch() {
        return epoch;
    }
Get the leader epoch, which is constant for each instance.

@return the leader epoch
raft/src/main/java/org/apache/kafka/raft/internals/BatchAccumulator.java