docs: private void changeReplicas(PrimaryTerm term) {
      threadContext.execute(() -> {
        if (this.term == null || term.term() > this.term.term()) {
          this.term = term;
          consumer.register(term.primary().memberId());
        }
      });
    }