code: private void takeLeadership() {
      raft.setLeader(raft.getCluster().getMember().memberId());
      raft.getCluster().getRemoteMemberStates().forEach(m -> m.resetState(raft.getLog()));
    }
docs: Sets the current node as the cluster leader.