GigaSpaces XAP 8.0 API

com.sun.jini.thread
Class WakeupManager.ThreadDesc

java.lang.Object
  extended by com.sun.jini.thread.WakeupManager.ThreadDesc
Enclosing class:
WakeupManager

public static class WakeupManager.ThreadDesc
extends Object

Description of a future thread.

See Also:
WakeupManager.schedule(long, java.lang.Runnable), WakeupManager.WakeupManager(WakeupManager.ThreadDesc)

Constructor Summary
WakeupManager.ThreadDesc()
          Equivalent to ThreadDesc(null, false)
WakeupManager.ThreadDesc(ThreadGroup group, boolean daemon)
          Equivalent to ThreadDesc(group, deamon, Thread.NORM_PRIORITY)
WakeupManager.ThreadDesc(ThreadGroup group, boolean daemon, int priority)
          Describe a future thread that will be created in the given group, deamon status, and priority.
 
Method Summary
 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WakeupManager.ThreadDesc

public WakeupManager.ThreadDesc()
Equivalent to
     ThreadDesc(null, false)
 


WakeupManager.ThreadDesc

public WakeupManager.ThreadDesc(ThreadGroup group,
                                boolean daemon)
Equivalent to
     ThreadDesc(group, deamon, Thread.NORM_PRIORITY)
 


WakeupManager.ThreadDesc

public WakeupManager.ThreadDesc(ThreadGroup group,
                                boolean daemon,
                                int priority)
Describe a future thread that will be created in the given group, deamon status, and priority.

Parameters:
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.
Throws:
IllegalArgumentException - if priority is not in between Thread.MIN_PRIORITY and Thread.MAX_PRIORITY
Method Detail

getGroup

public ThreadGroup getGroup()
The ThreadGroup the thread will be created in.

Returns:
the ThreadGroup the thread will be created in.

isDaemon

public boolean isDaemon()
Returns true if the the thread will be daemon thread, returns false otherwise.

Returns:
true if the the thread will be daemon thread, returns false otherwise.

getPriority

public int getPriority()
The priority the thread should be created with.

Returns:
the priority the thread should be created with.

thread

public Thread thread(Runnable r)
Create a thread for the given runnable based on the values in this object. May be overridden to give full control over creation of thread.

Returns:
a thread to run r, unstarted

toString

public String toString()
Overrides:
toString in class Object

GigaSpaces XAP 8.0 API

Copyright © GigaSpaces.