Пример #1
0
  // Execute all callable objects and pause if any of them has not completed
  public void ExecuteWithRetries(String description) throws Exception {
    ArrayList results = Lists.CreateBooleanList(false);

    do {
      try {
        // Try to execute the tasks
        results = Execute();

        // If any of the tasks have not yet been executed, pause
        if (Lists.AnyFalse(results)) Pause(description);
      } catch (Exception ex) {
        // Pause after an exception has occurred
        Utilities.Log.Exception(ex);
        Pause(description);
      }
    } while (Lists.AnyFalse(results));
  }