public static class WakeupManager.ThreadDesc extends Object
Constructor and Description |
---|
ThreadDesc()
Equivalent to
|
ThreadDesc(ThreadGroup group,
boolean daemon)
Equivalent to
|
ThreadDesc(ThreadGroup group,
boolean daemon,
int priority)
Describe a future thread that will be created in the given group, deamon status, and
priority.
|
Modifier and Type | Method and Description |
---|---|
ThreadGroup |
getGroup()
The
ThreadGroup the thread will be created in. |
int |
getPriority()
The priority the thread should be created with.
|
boolean |
isDaemon()
Returns
true if the the thread will be daemon thread, returns
false otherwise. |
Thread |
thread(Runnable r)
Create a thread for the given runnable based on the values in this object.
|
String |
toString() |
public ThreadDesc()
ThreadDesc(null, false)
public ThreadDesc(ThreadGroup group, boolean daemon)
ThreadDesc(group, deamon, Thread.NORM_PRIORITY)
public ThreadDesc(ThreadGroup group, boolean daemon, int priority)
group
- The group to be created in. If null
, the thread will be
created in the default group.daemon
- The thread will be a daemon thread if this is true
.priority
- The thread's priority.IllegalArgumentException
- if priority is not in between Thread.MIN_PRIORITY
and Thread.MAX_PRIORITY
public ThreadGroup getGroup()
ThreadGroup
the thread will be created in.ThreadGroup
the thread will be created in.public boolean isDaemon()
true
if the the thread will be daemon thread, returns
false
otherwise.true
if the the thread will be daemon thread, returns
false
otherwise.public int getPriority()
public Thread thread(Runnable r)
r
, unstartedCopyright © GigaSpaces.