public enum ThreadState extends java.lang.Enum<ThreadState>
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()
.
Enum Constant and Description |
---|
BLOCKED
The current thread is blocked on a monitor.
|
NETIO
The current thread is in a Net IO operation.
|
RUNNABLE
The current thread is runnable.
|
WAITING
The current thread is waiting.
|
Modifier and Type | Method and Description |
---|---|
void |
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 |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ThreadState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ThreadState RUNNABLE
public static final ThreadState WAITING
public static final ThreadState BLOCKED
public static final ThreadState NETIO
public static ThreadState[] values()
for (ThreadState c : ThreadState.values()) System.out.println(c);
public static ThreadState valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic void enter()
public static void exit()