private Address waitForReplicaAddress ( int replica , IPartition partition , int backupCount ) { int tryCount = RETRY_COUNT ; Address replicaAddress = null ; while ( replicaAddress == null && partitionService . getMaxAllowedBackupCount ( ) >= backupCount && tryCount -- > 0 ) { sleep ( ) ; replicaAddress = partition . getReplicaAddress ( replica ) ; } return replicaAddress ; }
Waits partition table update to get replica address if current replica address is null .