Enum TaskState
- java.lang.Object
-
- java.lang.Enum<TaskState>
-
- com.unboundid.ldap.sdk.unboundidds.tasks.TaskState
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TaskState>
@ThreadSafety(level=COMPLETELY_THREADSAFE) public enum TaskState extends java.lang.Enum<TaskState>
This class defines a task state, which provides information about the current state of processing for a scheduled task.
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundidds
package structure, are only supported for use against Ping Identity, UnboundID, and Nokia/Alcatel-Lucent 8661 server products. These classes provide support for proprietary functionality or for external specifications that are not considered stable or mature enough to be guaranteed to work in an interoperable way with other types of LDAP servers.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CANCELED_BEFORE_STARTING
The task state that indicates that the task was canceled before it started running.COMPLETED_SUCCESSFULLY
The task state that indicates that the task has completed successfully.COMPLETED_WITH_ERRORS
The task state that indicates that the task has completed but with one or more errors.DISABLED
The task state that indicates that the task has been disabled.RUNNING
The task state that indicates that the task is running.STOPPED_BY_ADMINISTRATOR
The task state that indicates that the task was forced to stop running when it was canceled by an administrator.STOPPED_BY_ERROR
The task state that indicates that the task was forced to stop running when it encountered an unrecoverable error.STOPPED_BY_SHUTDOWN
The task state that indicates that the task was forced to stop running when the task scheduler was shut down.UNSCHEDULED
The task state that indicates that the task has not yet been scheduled.WAITING_ON_DEPENDENCY
The task state that indicates that the task has one or more unsatisfied dependencies.WAITING_ON_START_TIME
The task state that indicates that the task is waiting on the start time to arrive.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TaskState
forName(java.lang.String name)
Retrieves the task state with the specified name.java.lang.String
getName()
Retrieves the name of this task state.boolean
isCompleted()
Indicates whether this task state indicates that the task has completed all of the processing that it will do.boolean
isPending()
Indicates whether this task state indicates that the task has not yet started running.boolean
isRunning()
Indicates whether this task state indicates that the task is currently running.java.lang.String
toString()
Retrieves a string representation of this task state.static TaskState
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static TaskState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CANCELED_BEFORE_STARTING
public static final TaskState CANCELED_BEFORE_STARTING
The task state that indicates that the task was canceled before it started running.
-
COMPLETED_SUCCESSFULLY
public static final TaskState COMPLETED_SUCCESSFULLY
The task state that indicates that the task has completed successfully.
-
COMPLETED_WITH_ERRORS
public static final TaskState COMPLETED_WITH_ERRORS
The task state that indicates that the task has completed but with one or more errors.
-
DISABLED
public static final TaskState DISABLED
The task state that indicates that the task has been disabled.
-
RUNNING
public static final TaskState RUNNING
The task state that indicates that the task is running.
-
STOPPED_BY_ADMINISTRATOR
public static final TaskState STOPPED_BY_ADMINISTRATOR
The task state that indicates that the task was forced to stop running when it was canceled by an administrator.
-
STOPPED_BY_ERROR
public static final TaskState STOPPED_BY_ERROR
The task state that indicates that the task was forced to stop running when it encountered an unrecoverable error.
-
STOPPED_BY_SHUTDOWN
public static final TaskState STOPPED_BY_SHUTDOWN
The task state that indicates that the task was forced to stop running when the task scheduler was shut down.
-
UNSCHEDULED
public static final TaskState UNSCHEDULED
The task state that indicates that the task has not yet been scheduled.
-
WAITING_ON_DEPENDENCY
public static final TaskState WAITING_ON_DEPENDENCY
The task state that indicates that the task has one or more unsatisfied dependencies.
-
WAITING_ON_START_TIME
public static final TaskState WAITING_ON_START_TIME
The task state that indicates that the task is waiting on the start time to arrive.
-
-
Method Detail
-
values
public static TaskState[] 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 (TaskState c : TaskState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TaskState valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getName
@NotNull public java.lang.String getName()
Retrieves the name of this task state.- Returns:
- The name of this task state.
-
forName
@Nullable public static TaskState forName(@NotNull java.lang.String name)
Retrieves the task state with the specified name.- Parameters:
name
- The name of the task state to retrieve.- Returns:
- The requested task state, or
null
if there is no state with the given name.
-
isPending
public boolean isPending()
Indicates whether this task state indicates that the task has not yet started running.- Returns:
true
if this task state indicates that the task has not yet started, orfalse
if not.
-
isRunning
public boolean isRunning()
Indicates whether this task state indicates that the task is currently running.- Returns:
true
if this task state indicates that the task is currently running, orfalse
if not.
-
isCompleted
public boolean isCompleted()
Indicates whether this task state indicates that the task has completed all of the processing that it will do.- Returns:
true
if this task state indicates that the task has completed all of the processing that it will do, orfalse
if not.
-
-