Enum ThreadStatus
- java.lang.Object
-
- java.lang.Enum<ThreadStatus>
-
- com.jprofiler.api.platform.parameters.ThreadStatus
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ThreadStatus>
public enum ThreadStatus extends java.lang.Enum<ThreadStatus>
Represents all supported thread statuses.These constants are used as parameters in various
Connectionmethods.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetName()Returns a verbose description of the thread status.java.lang.StringtoString()static ThreadStatusvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ThreadStatus[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ALL
public static final ThreadStatus ALL
All thread statuses.
-
RUNNING
public static final ThreadStatus RUNNING
Only when the thread is running. More precisely if the thread is eligible to run, including the times when the scheduler of the operating system does not allocate CPU time to the thread.
-
SLEEPING
public static final ThreadStatus SLEEPING
Only when the thread is sleeping. This happens when a thread callsObject.wait()or uses corresponding facilities ofjava.util.concurrent.
-
BLOCKING
public static final ThreadStatus BLOCKING
Only when the thread is blocking. This happens when a thread tries to enter a contendedsynchronizedmethod or block or uses corresponding facilities ofjava.util.concurrent.
-
NET_IO
public static final ThreadStatus NET_IO
Only when the thread is waiting for the network to accept or deliver data.
-
-
Method Detail
-
values
public static ThreadStatus[] 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 (ThreadStatus c : ThreadStatus.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ThreadStatus 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
public java.lang.String getName()
Returns a verbose description of the thread status.- Returns:
- the verbose description
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Enum<ThreadStatus>
-
-