@Override
    public void clear() {
        history.clear();
    }
A implementation for {@code LogHistory} which uses a red-black tree to store values sorted by offset.
raft/src/main/java/org/apache/kafka/raft/internals/TreeMapLogHistory.java