@Override
    public Optional<ElectionState> readElectionState() {
        if (!stateFile.exists()) {
            return Optional.empty();
        }

        return Optional.of(ElectionState.fromQuorumStateData(readStateFromFile(stateFile)));
    }
Reads the election state from local file.
raft/src/main/java/org/apache/kafka/raft/FileQuorumStateStore.java