Package panamagl.utils
Class ThreadUtils
java.lang.Object
panamagl.utils.ThreadUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static ThreadgetThreads(String threadName) static ThreadgetThreads(ThreadGroup group, String threadName) protected static voidstatic voidlistThreads(ThreadGroup group, String indent) static voidstatic voidprint()Print all threads, their status and priority in console.
-
Constructor Details
-
ThreadUtils
public ThreadUtils()
-
-
Method Details
-
main
-
listThreads
protected static void listThreads() -
listThreads
-
getThreads
-
getThreads
-
print
public static void print()Print all threads, their status and priority in console. Statuses :- NEW: The thread has been created, but has not yet started.
- RUNNABLE: The thread is currently executing.
- BLOCKED: The thread is blocked and waiting for a monitor lock.
- WAITING: The thread is waiting indefinitely for another thread to perform a particular action.
- TIMED_WAITING: The thread is waiting for another thread to perform an action for up to a specified waiting time.
- TERMINATED: The thread has completed execution.
-