mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

kenneth_suter
16.19.2007 eee90cc3e34f4e5a7d562ee9e60c66a61816985c
opends/src/server/org/opends/server/backends/task/TaskState.java
@@ -224,6 +224,26 @@
  }
  /**
   * Indicates whether or not this task has been cancelled.
   *
   * @param  taskState  The task state for which to make the determination.
   *
   * @return  <CODE>true</CODE> if the task state indicates that the task
   *          was cancelled either before or during execution, or
   *          <CODE>false</CODE> otherwise.
   */
  public static boolean isCancelled(TaskState taskState)
  {
    switch(taskState)
    {
      case STOPPED_BY_ADMINISTRATOR:
      case CANCELED_BEFORE_STARTING:
        return true;
      default:
        return false;
    }
  }
  /**
   * Retrieves the task state that corresponds to the provided string value.