docs: private void doRun() throws InterruptedException {
          boolean migrating = false;
          for (; ; ) {
              if (!migrationManager.areMigrationTasksAllowed()) {
                  break;
              }
              MigrationRunnable runnable = queue.poll(1, TimeUnit.SECONDS);
              if (runnable == null) {
                  break;
              }
  
              migrating |= runnable instanceof MigrationManager.MigrateTask;
              processTask(runnable);
              if (migrating && partitionMigrationInterval > 0) {
                  Thread.sleep(partitionMigrationInterval);
              }
          }
          boolean hasNoTasks = !queue.hasMigrationTasks();
          if (hasNoTasks) {
              if (migrating) {
                  logger.info("All migration tasks have been completed. ("
                          + migrationManager.getStats().formatToString(logger.isFineEnabled()) + ")");
              }
              Thread.sleep(sleepTime);
          } else if (!migrationManager.areMigrationTasksAllowed()) {
              Thread.sleep(sleepTime);
          }
      }