de.grogra.util
public final class ThreadContext extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static short |
MAX_PRIORITY |
static short |
MIN_PRIORITY |
static short |
NORMAL_PRIORITY |
| Modifier and Type | Method and Description |
|---|---|
ThreadContext |
check() |
void |
checkInterruption() |
static ThreadContext |
current() |
int |
getId() |
short |
getPriority() |
java.lang.Object |
getProperty(int propertyId) |
java.lang.Thread |
getThread() |
boolean |
hasHigherPriorityThan(ThreadContext o) |
boolean |
isCurrent() |
void |
join() |
void |
joinWhileExecuting(java.lang.Runnable r) |
void |
leave() |
static int |
registerProperty() |
void |
setPriority(short priority) |
void |
setProperty(int propertyId,
java.lang.Object value) |
public static final short MAX_PRIORITY
public static final short MIN_PRIORITY
public static final short NORMAL_PRIORITY
public ThreadContext check()
public void checkInterruption()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic static ThreadContext current()
public int getId()
public short getPriority()
public java.lang.Object getProperty(int propertyId)
public java.lang.Thread getThread()
public boolean hasHigherPriorityThan(ThreadContext o)
public boolean isCurrent()
public void join()
public void joinWhileExecuting(java.lang.Runnable r)
public void leave()
public static int registerProperty()
public void setPriority(short priority)
public void setProperty(int propertyId,
java.lang.Object value)