Package org.opends.server.backends.task
Enum Class TaskState
- All Implemented Interfaces:
Serializable,Comparable<TaskState>,java.lang.constant.Constable
This enumeration defines the various states that a task can have during its lifetime.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe task state that indicates that the task was canceled by an administrator before it started running.The task state that indicates that the task has completed without any errors.The task state that indicates that the task was able to complete its intended goal, but that one or more errors were encountered during the process.The task state that indicates that the task has been disabled by an administrator.The task state that indicates that the task is recurring.The task state that indicates that the task is currently running.The task state that indicates that the task was stopped by an administrator after it had already started but before it was able to complete.The task state that indicates that one or more errors prevented the task from completing.The task state that indicates that the task was unable to complete because it was interrupted by the shutdown of the task backend.The task state that indicates that the task has not yet been scheduled, or possibly that the scheduler is currently not running.The task state that indicates that at least one of the task's defined dependencies has not yet completed.The task state that indicates that the task's scheduled start time has not yet arrived.The task state that indicates that the task will be retried again. -
Method Summary
Modifier and TypeMethodDescriptionstatic TaskStatefromString(String s) Retrieves the task state that corresponds to the provided string value.Gets a locale sensitive representation of this state.booleanIndicates whether this task has been cancelled.booleanisDone()Indicates whether a task with the specified state has completed all the processing that it will do, regardless of whether it completed its intended goal.booleanIndicates whether a task with the specified state is currently pending execution.booleanIndicates whether a task with the specified state is recurring.booleanIndicates whether a task with the specified state is currently running.booleanIndicates whether a task with the specified state has been able to complete its intended goal.static TaskStateReturns the enum constant of this class with the specified name.static TaskState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNSCHEDULED
The task state that indicates that the task has not yet been scheduled, or possibly that the scheduler is currently not running. -
DISABLED
The task state that indicates that the task has been disabled by an administrator. -
WAITING_ON_START_TIME
The task state that indicates that the task's scheduled start time has not yet arrived. -
WAITING_ON_DEPENDENCY
The task state that indicates that at least one of the task's defined dependencies has not yet completed. -
RUNNING
The task state that indicates that the task is currently running. -
RECURRING
The task state that indicates that the task is recurring. -
COMPLETED_SUCCESSFULLY
The task state that indicates that the task has completed without any errors. -
COMPLETED_WITH_ERRORS
The task state that indicates that the task was able to complete its intended goal, but that one or more errors were encountered during the process. -
STOPPED_BY_SHUTDOWN
The task state that indicates that the task was unable to complete because it was interrupted by the shutdown of the task backend. -
STOPPED_BY_ERROR
The task state that indicates that one or more errors prevented the task from completing. -
STOPPED_BY_ADMINISTRATOR
The task state that indicates that the task was stopped by an administrator after it had already started but before it was able to complete. -
CANCELED_BEFORE_STARTING
The task state that indicates that the task was canceled by an administrator before it started running. -
WILL_RETRY
The task state that indicates that the task will be retried again. Used byInitializeTaskas internal state.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
isPending
public boolean isPending()Indicates whether a task with the specified state is currently pending execution.- Returns:
trueif the task state indicates that the task is currently pending, orfalseotherwise.
-
isRunning
public boolean isRunning()Indicates whether a task with the specified state is currently running.- Returns:
trueif the task state indicates that the task is currently running, orfalseotherwise.
-
isRecurring
public boolean isRecurring()Indicates whether a task with the specified state is recurring.- Returns:
trueif the task state indicates that the task is recurring, orfalseotherwise.
-
isDone
public boolean isDone()Indicates whether a task with the specified state has completed all the processing that it will do, regardless of whether it completed its intended goal.- Returns:
falseif the task state indicates that the task has not yet started or is currently running, ortrueotherwise
-
isSuccessful
public boolean isSuccessful()Indicates whether a task with the specified state has been able to complete its intended goal.- Returns:
trueif the task state indicates that the task completed successfully or with minor errors that still allowed it to achieve its goal, orfalseotherwise.
-
isCancelled
public boolean isCancelled()Indicates whether this task has been cancelled.- Returns:
trueif the task state indicates that the task was cancelled either before or during execution, orfalseotherwise.
-
fromString
Retrieves the task state that corresponds to the provided string value.- Parameters:
s- The string value for which to retrieve the corresponding task state.- Returns:
- The corresponding task state, or
nullif none could be associated with the provided string.
-
getDisplayName
Gets a locale sensitive representation of this state.- Returns:
- LocalizableMessage describing state
-