Enum TaskRunResult.TaskRunResultStatus

    • Enum Constant Detail

      • FINISHED

        public static final TaskRunResult.TaskRunResultStatus FINISHED
        The task run has finished. This does not necessarily mean that the task itself is finished. For single tasks this means that the task is finished, but it is different for recurrent tasks. Such a task will run again after it sleeps for a while (or after the scheduler will start it again).
      • FINISHED_HANDLER

        public static final TaskRunResult.TaskRunResultStatus FINISHED_HANDLER
        The task run has finished, and this was the last run of the current handler. For single-run tasks, the effect is the same as of FINISHED value. However, for recurring tasks, this return value causes current handler to be removed from the handler stack.
      • PERMANENT_ERROR

        public static final TaskRunResult.TaskRunResultStatus PERMANENT_ERROR
        The run has failed. The error is permanent. Unless the administrator does something to recover from the situation, there is no point in re-trying the run. Usual case of this error is task misconfiguration.
      • TEMPORARY_ERROR

        public static final TaskRunResult.TaskRunResultStatus TEMPORARY_ERROR
        Temporary failure during the run. The error is temporary. The situation may change later when the conditions will be more "favorable". It makes sense to retry the run. Usual cases of this error are network timeouts. For single-run tasks we SUSPEND them on such occasion. So the administrator can release them after correcting the problem.
      • INTERRUPTED

        public static final TaskRunResult.TaskRunResultStatus INTERRUPTED
        Task run hasn't finished but nevertheless it must end (for now). An example of such a situation is when the long-living task run execution is requested to stop (e.g. when suspending the task or shutting down the node). For single-run tasks this state means that the task SHOULD NOT be closed, nor the handler should be removed from the handler stack.
      • RESTART_REQUESTED

        public static final TaskRunResult.TaskRunResultStatus RESTART_REQUESTED
        Task has to be restarted, typically because a new handler was put onto the handler stack during the task run.
    • Method Detail

      • values

        public static TaskRunResult.TaskRunResultStatus[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TaskRunResult.TaskRunResultStatus c : TaskRunResult.TaskRunResultStatus.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TaskRunResult.TaskRunResultStatus valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null