xdc.services.getset
Class Scheduler

java.lang.Object
  extended by xdc.services.getset.Scheduler

public class Scheduler
extends java.lang.Object

Schedules execution of Fxns and Groups. Fxns within a group always run to completion before another function within the group. Groups may interrupt each other.

Note: Does not support multiple Threads accessing the XDCscript object model.


Constructor Summary
Scheduler()
           
 
Method Summary
static Group createGroup()
           
static Fxn getRunningFxn()
          Get which Fxn is currently running, or null if none.
static Group getRunningGroup()
          Get which Group is currently running, or null if none.
static void schedule(Group group)
          Schedule the group for execution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scheduler

public Scheduler()
Method Detail

createGroup

public static Group createGroup()

getRunningGroup

public static Group getRunningGroup()
Get which Group is currently running, or null if none.


getRunningFxn

public static Fxn getRunningFxn()
Get which Fxn is currently running, or null if none.


schedule

public static void schedule(Group group)
Schedule the group for execution. If the group isn't already running then execute it immediately. Interrupts any other groups that are currently running.

If a group that is already running anywhere on the stack is rescheduled, ignore the request and let the group complete on it own time.