- * To be called when we need to update the current term either because we
- * received a message from someone with a more up-to-date term or because we
- * just voted for someone
- * <p>
- * This information needs to be persisted so that on recovery the replica
- * can start itself in the right term and know if it has already voted in
- * that term or not
+ * This method updates the in-memory election term state and persists it so it can be recovered on next restart.
+ * This method should be called when starting a new election or when a Raft RPC message is received with a higher
+ * term.