public void setTerm(long term) {
    if (term > this.term) {
      this.term = term;
      this.leader = null;
      this.lastVotedFor = null;
      meta.storeTerm(this.term);
      meta.storeVote(this.lastVotedFor);
      log.debug("Set term {}", term);
    }
  }
public void setTerm ( long term ) { if ( term > this . term ) { this . term = term ; this . leader = null ; this . lastVotedFor = null ; meta . storeTerm ( this . term ) ; meta . storeVote ( this . lastVotedFor ) ; log . debug ( "Set term {}" , term ) ; } }
Sets the state term.

@param term The state term.