Package com.jprofiler.api.probe.injected
Enum Class ThreadState
- All Implemented Interfaces:
Serializable
,Comparable<ThreadState>
,Constable
Allows you to override the thread state recorded in JProfiler.
You can nest calls to enter()
and exit()
, but only the outmost call is used for recording.
It is very important that a matching exit()
is always called, so if you call enter()
in an Interception
with with Interception.invokeOn()
set to InvocationType.ENTER
,
you must always define a method right below it that is annotated with AdditionalInterception
with AdditionalInterception.value()
set to InvocationType.EXIT
where you call exit()
.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
enter()
Enters a thread state.static void
exit()
Exists the current override state and resets the state to the value reported by the JVM.static ThreadState
Returns the enum constant of this class with the specified name.static ThreadState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RUNNABLE
The current thread is runnable. -
WAITING
The current thread is waiting. -
BLOCKED
The current thread is blocked on a monitor. -
NETIO
The current thread is in a Net IO operation.
-
-
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
-
enter
public void enter()Enters a thread state. This state will be recorded until the matching exit is called. -
exit
public static void exit()Exists the current override state and resets the state to the value reported by the JVM.
-