Package org.brijframework.util.runtime
Class ThreadUtil
- java.lang.Object
-
- org.brijframework.util.runtime.ThreadUtil
-
public class ThreadUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description ThreadUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<Thread>getAliveThreadGroup(String name)static List<Thread>getALiveThreadGroup(String name, Thread.State state)static List<Thread>getThreadGroup(String name)static booleanintrrupted(long id)static voidrunGc(int n)static voidsleepForSeconds(int seconds)To sleep for specified seconds.static voidsleepForSoManyMilliSeconds(int milliSeconds)static voidsleepForSoManySeconds(int seconds)
-
-
-
Method Detail
-
sleepForSeconds
public static void sleepForSeconds(int seconds) throws InterruptedExceptionTo sleep for specified seconds.
- Parameters:
seconds- till which you want program to sleep.- Throws:
InterruptedException- Since:
- Foundation 1.0
-
intrrupted
public static boolean intrrupted(long id) throws InterruptedException- Throws:
InterruptedException
-
getThreadGroup
public static List<Thread> getThreadGroup(String name) throws InterruptedException
- Throws:
InterruptedException
-
getAliveThreadGroup
public static List<Thread> getAliveThreadGroup(String name) throws InterruptedException
- Throws:
InterruptedException
-
getALiveThreadGroup
public static List<Thread> getALiveThreadGroup(String name, Thread.State state) throws InterruptedException
- Throws:
InterruptedException
-
sleepForSoManySeconds
public static void sleepForSoManySeconds(int seconds)
-
sleepForSoManyMilliSeconds
public static void sleepForSoManyMilliSeconds(int milliSeconds)
-
runGc
public static void runGc(int n)
-
-