@Override
  protected void serializeStateData(ProcedureStateSerializer serializer) throws IOException {
    super.serializeStateData(serializer);
    serializer.serialize(AddPeerStateData.newBuilder()
      .setPeerConfig(ReplicationPeerConfigUtil.convert(peerConfig)).setEnabled(enabled).build());
  }
The procedure for adding a new replication peer.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/AddPeerProcedure.java