/** Waits partition table update to get replica address if current replica address is null. */
 protected Address waitForReplicaAddress(
     int replica,
     InternalPartition partition,
     InternalPartitionService partitionService,
     int backupCount) {
   int tryCount = RETRY_COUNT;
   Address replicaAddress = null;
   while (replicaAddress == null
       && partitionService.getMemberGroupsSize() > backupCount
       && tryCount-- > 0) {
     sleep();
     replicaAddress = partition.getReplicaAddress(replica);
   }
   return replicaAddress;
 }
 protected boolean isReplicaAvailable(
     Address replicaAddress, InternalPartitionService partitionService, int backupCount) {
   return !(replicaAddress == null && partitionService.getMemberGroupsSize() > backupCount);
 }