public void onAppendEntriesResponse(AppendEntriesResponse response) {

    // You are the leader, but if someone are better than you ...
    handleLargerTerm(response.getTerm());

    // If you are not the leader at this point, lol~
    if (this.role != Roles.Leader) {
      return;
    }

    switch (response.getStatus()) {
      case ERROR:
        int index = decNextIndexFor(response.getCandidateId());
        this.communicator.sendTo(response.getCandidateId(), Messages.AppendEntriesRequest,
                  newAppendEntriesRequest(this.entries.get(index)).toByteArray());
        break;
      case SUCCESS:
        incNextIndexFor(response.getCandidateId());
        break;
      default: ;
    }
  }