protected boolean waitForColocationCompleted(PartitionedRegion partitionedRegion) {
    int sleepInterval = PartitionedRegionHelper.DEFAULT_WAIT_PER_RETRY_ITERATION;

    while (!ColocationHelper.isColocationComplete(partitionedRegion)
        && (retryCount < MAX_NUMBER_INTERVALS)) {

      // Didn't time out. Sleep a bit and then continue
      boolean interrupted = Thread.interrupted();
      try {
        logger.info("Waiting for collocation to complete, retry number {}", retryCount);
        Thread.sleep(sleepInterval);
      } catch (InterruptedException ignore) {
        interrupted = true;
      } finally {
        if (interrupted) {
          Thread.currentThread().interrupt();
        }
      }

      if (partitionedRegion.isLocallyDestroyed || partitionedRegion.isClosed) {
        return false;
      }

      retryCount++;
      if (retryCount == SMALL_200MS_INTERVALS) {
        sleepInterval = 2 * PartitionedRegionHelper.DEFAULT_WAIT_PER_RETRY_ITERATION;
      } else if (retryCount == SMALL_500MS_INTERVALS) {
        sleepInterval = 5 * PartitionedRegionHelper.DEFAULT_WAIT_PER_RETRY_ITERATION;
      } else if (retryCount == MEDIUM_1SEC_INTERVALS) {
        sleepInterval = 10 * PartitionedRegionHelper.DEFAULT_WAIT_PER_RETRY_ITERATION;
      } else if (retryCount == MEDIUM_2SEC_INTERVALS) {
        sleepInterval = 20 * PartitionedRegionHelper.DEFAULT_WAIT_PER_RETRY_ITERATION;
      } else if (retryCount == LARGE_5SEC_INTERVALS) {
        sleepInterval = 50 * PartitionedRegionHelper.DEFAULT_WAIT_PER_RETRY_ITERATION;
      }

    }
    return ColocationHelper.isColocationComplete(partitionedRegion);

  }
Wait for Colocation to complete. Wait all nodes to Register this PartitionedRegion.
geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/CreateMissingBucketsTask.java