@Override
    public void writeElectionState(ElectionState latest, KRaftVersion kraftVersion) {
        short quorumStateVersion = kraftVersion.quorumStateVersion();

        writeElectionStateToFile(
            stateFile,
            latest.toQuorumStateData(quorumStateVersion),
            quorumStateVersion
        );
    }
Reads the election state from local file.
raft/src/main/java/org/apache/kafka/raft/FileQuorumStateStore.java