|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.util.Threads
public class Threads
Thread Utility
| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
LOG
|
| Constructor Summary | |
|---|---|
Threads()
|
|
| Method Summary | |
|---|---|
static Thread |
setDaemonThreadRunning(Thread t,
String name)
Utility method that sets name, daemon status and starts passed thread. |
static Thread |
setDaemonThreadRunning(Thread t,
String name,
Thread.UncaughtExceptionHandler handler)
Utility method that sets name, daemon status and starts passed thread. |
static void |
shutdown(Thread t)
Shutdown passed thread using isAlive and join. |
static void |
shutdown(Thread t,
long joinwait)
Shutdown passed thread using isAlive and join. |
static void |
sleep(int millis)
|
static void |
threadDumpingIsAlive(Thread t)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log LOG
| Constructor Detail |
|---|
public Threads()
| Method Detail |
|---|
public static Thread setDaemonThreadRunning(Thread t,
String name)
t - thread to frobname - new name
t.
public static Thread setDaemonThreadRunning(Thread t,
String name,
Thread.UncaughtExceptionHandler handler)
t - thread to frobname - new namehandler - A handler to set on the thread. Pass null if want to
use default handler.
t.public static void shutdown(Thread t)
t - Thread to shutdown
public static void shutdown(Thread t,
long joinwait)
joinwait - Pass 0 if we're to wait forever.t - Thread to shutdown
public static void threadDumpingIsAlive(Thread t)
throws InterruptedException
t - Waits on the passed thread to die dumping a threaddump every
minute while its up.
InterruptedExceptionpublic static void sleep(int millis)
millis - How long to sleep for in milliseconds.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||