Add primary replica API.
Add primary replica API.

tempbottle/copycat,arnonmoscona/copycat,tempbottle/copycat,atomix/atomix,madjam/copycat,arnonmoscona/copycat,aruanruan/copycat,quantiply-fork/copycat,atomix/atomix,kuujo/copycat,kuujo/copycat,madjam/copycat,aruanruan/copycat